Merge pull request #82952 from AbelToy/gds-export-array

Allow `@export`ed Arrays to set property hints for their elements
This commit is contained in:
Rémi Verschelde 2024-03-06 09:49:53 +01:00
commit 0acc4276b6
No known key found for this signature in database
GPG key ID: C3336907360768E1
14 changed files with 470 additions and 73 deletions

View file

@ -0,0 +1,4 @@
@export_enum("A", "B", "C") var x: Array[Color]
func test():
pass

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
"@export_enum" annotation requires a variable of type "int", "Array[int]", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "String", "Array[String]", or "PackedStringArray", but type "Array[Color]" was given instead.

View file

@ -0,0 +1,4 @@
@export_enum("A", "B", "C") var x: Color
func test():
pass

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
"@export_enum" annotation requires a variable of type "int", "Array[int]", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "String", "Array[String]", or "PackedStringArray", but type "Color" was given instead.