GDScript: Add missing member type check when resolving extends

(cherry picked from commit 66279b98b6)
This commit is contained in:
Danil Alexeev
2023-04-24 17:00:35 +02:00
committed by Yuri Sizov
parent 3a5bc7455e
commit d31002cfbe
7 changed files with 58 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.