C#: Fix generator crash w/ generic arrays
This commit is contained in:
parent
d282e4f0e6
commit
aba787393f
4 changed files with 69 additions and 1 deletions
|
|
@ -658,7 +658,10 @@ namespace Godot.SourceGenerators
|
|||
var elementType = MarshalUtils.GetArrayElementType(type);
|
||||
|
||||
if (elementType == null)
|
||||
return false; // Non-generic Array, so there's no hint to add
|
||||
return false; // Non-generic Array, so there's no hint to add.
|
||||
|
||||
if (elementType.TypeKind == TypeKind.TypeParameter)
|
||||
return false; // The generic is not constructed, we can't really hint anything.
|
||||
|
||||
var elementMarshalType = MarshalUtils.ConvertManagedTypeToMarshalType(elementType, typeCache)!.Value;
|
||||
var elementVariantType = MarshalUtils.ConvertMarshalTypeToVariantType(elementMarshalType)!.Value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue