GDScript: fix regression when checking for virtual function implementation.
Unfortunately it appears the virtual function checks in #77324 are not trustworthy at runtime, because objects can have scripts attached, but this information is not always available at compile-time. These checks need to be removed. The rest of the PR is still useful, making all method flags available to the analyzer, so a full revert isn't necessary/desirable. This reopens #76938, which will need another solution.
This commit is contained in:
@ -1,2 +0,0 @@
|
||||
func test():
|
||||
_get_property_list()
|
||||
@ -1,2 +0,0 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Cannot call virtual function "_get_property_list()" because it hasn't been defined.
|
||||
@ -1,5 +0,0 @@
|
||||
func _init():
|
||||
super()
|
||||
|
||||
func test():
|
||||
pass
|
||||
@ -1,2 +0,0 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Cannot call the parent class' virtual function "_init()" because it hasn't been defined.
|
||||
@ -1,11 +0,0 @@
|
||||
class TestOne:
|
||||
func _get_property_list():
|
||||
return {}
|
||||
|
||||
class TestTwo extends TestOne:
|
||||
func _init():
|
||||
var _x = _get_property_list()
|
||||
|
||||
func test():
|
||||
var x = TestTwo.new()
|
||||
var _x = x._get_property_list()
|
||||
@ -1 +0,0 @@
|
||||
GDTEST_OK
|
||||
@ -1,10 +0,0 @@
|
||||
class TestOne:
|
||||
func _init():
|
||||
pass
|
||||
|
||||
class TestTwo extends TestOne:
|
||||
func _init():
|
||||
super()
|
||||
|
||||
func test():
|
||||
pass
|
||||
@ -1 +0,0 @@
|
||||
GDTEST_OK
|
||||
Reference in New Issue
Block a user