GDScript: Add missing member type check when resolving extends

This commit is contained in:
Danil Alexeev
2023-04-10 09:54:53 +03:00
parent 78e2479ef9
commit 66279b98b6
7 changed files with 57 additions and 1 deletions
@@ -0,0 +1,9 @@
# GH-75870
const A = 1
class B extends A:
pass
func test():
pass
@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Constant "A" is not a preloaded script or class.
@@ -0,0 +1,12 @@
# GH-75870
class A:
const X = 1
const Y = A.X # A.X is now resolved.
class B extends A.X:
pass
func test():
pass
@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Identifier "X" is not a preloaded script or class.
@@ -0,0 +1,9 @@
# GH-75870
var A = 1
class B extends A:
pass
func test():
pass
@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Cannot use variable "A" in extends chain.