GDScript: Fix parsing default parameter values from function calls

This commit is contained in:
strank
2022-01-12 21:13:08 -05:00
parent d13c3c9296
commit 960a26f6c0
5 changed files with 53 additions and 1 deletions
@@ -0,0 +1,9 @@
# https://github.com/godotengine/godot/issues/56702
func test():
# somewhat obscure feature: referencing parameters in defaults, but only earlier ones!
ref_default("non-optional")
func ref_default(nondefault1, defa=nondefault1, defb=defc, defc=1):
prints(nondefault1, nondefault2, defa, defb, defc)
@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Identifier "defc" not declared in the current scope.