GDScript: Report property type errors
Inline getters & setters are now FunctionNodes. Their names are set in the parser, not in the compiler. GDScript-Analyzer will now run through getter and setter. Also report wrong type or signature errors regarding getset properties. Added GDScript tests for getters and setters. #53102
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
var _prop = 1
|
||||
var prop:
|
||||
get = get_prop, set = set_prop
|
||||
|
||||
func get_prop():
|
||||
return _prop
|
||||
|
||||
func set_prop(value):
|
||||
_prop = value
|
||||
|
||||
func test():
|
||||
print(prop)
|
||||
|
||||
prop = 2
|
||||
|
||||
print(prop)
|
||||
Reference in New Issue
Block a user