1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

fix(gdscript): Infer type from preload const

When resolving the type of the attribute from the variant, the result_type.kind was overritten for no reason.
It is assumed that this only needs to be done, if the variant value is not valid to have any kind here.

Solves #63715
This commit is contained in:
Antonio Dell'Annunziata
2022-08-07 13:39:11 +02:00
parent 428aed8e87
commit f81a166ab8
4 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
const A := 42
func test():
pass

View File

@@ -0,0 +1,6 @@
const Constants = preload("gdscript_to_preload.gd")
func test():
var a := Constants.A
print(a)