Inherit parent method return types for untyped overrides

This commit is contained in:
Leonard Pop 2026-02-02 17:05:40 +02:00
parent f4f0679a2d
commit 058a46f154
11 changed files with 93 additions and 9 deletions

View file

@ -1,6 +1,6 @@
class BaseClass:
func _get_property_list():
return {"property" : "definition"}
return [{"property" : "definition"}]
class SuperClassMethodsRecognized extends BaseClass:
func _init():
@ -11,7 +11,7 @@ class SuperMethodsRecognized extends BaseClass:
func _get_property_list():
# Recognizes super method.
var result = super()
result["new"] = "new"
result[0]["new"] = "new"
return result
func test():