You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
GDScript: Add missing member type check when resolving extends
(cherry picked from commit 66279b98b6)
This commit is contained in:
committed by
Yuri Sizov
parent
3a5bc7455e
commit
d31002cfbe
@@ -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