Implement sizeof completely (#119)

This commit is contained in:
Patrick Stevens
2025-08-28 00:46:50 +01:00
committed by GitHub
parent 655ba4400a
commit 07fabfff65
15 changed files with 438 additions and 60 deletions

View File

@@ -33,6 +33,20 @@ type ConcreteType<'typeGeneric> =
_Generics : ImmutableArray<'typeGeneric>
}
override this.ToString () : string =
let basic = $"%s{this.Assembly.Name}.%s{this.Namespace}.%s{this.Name}"
let generics =
if this.Generics.IsEmpty then
""
else
this.Generics
|> Seq.map string
|> String.concat ", "
|> fun x -> "<" + x + ">"
basic + generics
member this.Assembly : AssemblyName = this._AssemblyName
member this.Definition : ComparableTypeDefinitionHandle = this._Definition
member this.Generics : ImmutableArray<'typeGeneric> = this._Generics