Skip to content

Spn<T>/byref-like types support #31

@controlflow

Description

@controlflow

Unfortunately, byref-like types cannot be used as type arguments...

System.TypeLoadException: The generic type 'SizeComputer`1' was used with an invalid instantiation in assembly 'ObjectLayoutInspector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.RuntimeType.MakeGenericType(Type[] instantiation)
   at ObjectLayoutInspector.InspectorHelper.GetSizeOfValueTypeInstance(Type type)
   at ObjectLayoutInspector.InspectorHelper.GetSize(Type type)
   at ObjectLayoutInspector.TypeLayout.<GetLayout>g__DoGetLayout|24_0(<>c__DisplayClass24_0& )
   at ObjectLayoutInspector.TypeLayout.GetLayout(Type type, TypeLayoutCache cache, Boolean includePaddings)

I guess you can emit the "same" type without byref flag...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions