GDScript: Fix return type of constructor call for extending class

This commit is contained in:
Dmitrii Maganov
2022-12-27 22:49:26 +02:00
parent b6e06038f8
commit f67aa3e46d
3 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,10 @@
class A:
func _init():
pass
class B extends A: pass
class C extends A: pass
func test():
var x := B.new()
print(x is C)

View File

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Expression is of type "B" so it can't be of type "C".