GDScript: Add missing member type check when resolving extends
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user