Vixen
02b45cc4
csharp
public sealed class MetadataNamedTypeSymbol

A type read out of a compiled library rather than out of source.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The point of this class is that it is a NamedTypeSymbol and nothing more specific. Member lookup, overload resolution, conversions, protocol conformance and compose resolution all work against the abstract symbol classes, so a library's declarations take part in binding on exactly the same terms as a source file's — which is what "referenced without reparsing source" has to mean to be worth anything. This is Roslyn's split between source symbols and PE symbols, at Raven's scale.

DeclaringSyntax stays null, so a diagnostic about a library type has no source span to point at. That is honest rather than unfortunate: the source is not in this compilation, and the alternative — a span into a file that may not exist on this machine — is worse than none.

Fields and properties (11)

  • public LibraryType Declaration

    The declaration as the artefact recorded it.

  • public string LibraryName

    Which library this type came from.

  • public override string Name
  • public override TypeKind TypeKind
  • public override Symbol? ContainingSymbol
  • public override IReadOnlyList<TypeParameterSymbol> TypeParameters
  • public MetadataNamedTypeSymbol? DeclaringType

    The type this one is nested in, when it is nested.

  • public string? IrStructName

    The IR struct this type lowered to when the library was built, or null when it has no storage. The link the lowerer uses to give a library struct the same identity in a consumer's module that it had in its own.

  • public override NamedTypeSymbol? BaseType
  • public override IReadOnlyList<NamedTypeSymbol> Interfaces
  • public IReadOnlyList<MetadataNamedTypeSymbol> NestedTypes

    Types declared inside this one.

Methods (2)

  • public override IReadOnlyList<Symbol> GetMembers()
  • public override IReadOnlyList<Symbol> GetMembers(string name)

Used by (9)

  • CompilationVixen.Raven
  • CompiledLibraryTestsVixen.Raven.Tests
  • MetadataFieldSymbolVixen.Raven
  • MetadataLoaderVixen.Raven
  • MetadataMethodSymbolVixen.Raven
  • MetadataParameterSymbolVixen.Raven
  • MetadataPropertySymbolVixen.Raven
  • MetadataScopeVixen.Raven
  • ReferenceLinkVixen.Raven