Merge pull request #71140 from vonagam/fix-const-index-subscript-type

GDScript: Fix type for index subscript on constant
This commit is contained in:
Rémi Verschelde
2023-01-10 07:58:29 +01:00
committed by GitHub
3 changed files with 10 additions and 9 deletions

View File

@ -0,0 +1,5 @@
const base := [0]
func test():
var sub := base[0]
if sub is String: pass

View File

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Expression is of type "int" so it can't be of type "String".