public record class LibraryTypeReferenceA reference to a type from somewhere else in the artefact: a member's type, a base, a constraint.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Deliberately not a serialized TypeSymbol. A primitive travels as its SpecialType, which is the identity the whole binder keys off; a declared type travels as a qualified name, which is stable across a recompilation of the library and resolvable against another library's types. Only structural types — arrays and tuples — carry their shape, because they have no name to be resolved by.
Fields and properties (11)
public LibraryTypeKind Kindpublic SpecialType SpecialFor Primitive and BuiltIn.
public string? NameQualified name for a declared type, simple name for a type parameter.
public LibraryTypeReference? ElementElement type of an array.
public int RankArray rank; T[,] is 2.
public int? LengthArray length, or null when unsized. Part of the type rather than a detail of it: float[4] and float[] are different types, so a signature that lost the length would resolve to something the source never declared.
public bool WritableFor Buffer: whether it is the RWBuffer form. Part of the type, because a store into the read-only form is RVN2119 and losing the direction would silently make it legal.
public ImmutableArray<LibraryTypeReference> ElementsElement types of a tuple.
public ImmutableArray<string?> ElementNamesElement names of a tuple; an entry is null for an unnamed element.
public ImmutableArray<LibraryTypeReference> TypeArgumentsType arguments, for a reference to a constructed generic type.
public static LibraryTypeReference ErrorType
Methods (1)
public static LibraryTypeReference Primitive(SpecialType special)
Used by (9)
- BuilderVixen.Raven
- LibraryFieldVixen.Raven
- LibraryMethodVixen.Raven
- LibraryParameterVixen.Raven
- LibraryPropertyVixen.Raven
- LibraryTypeVixen.Raven
- LibraryTypeParameterVixen.Raven
- MetadataLoaderVixen.Raven
- MetadataNamedTypeSymbolVixen.Raven