From 1bbb2b415997cceaf292c796c28de2761ad40960 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Sat, 17 Dec 2022 17:53:49 -0500 Subject: Fix outer class lookup --- .../tests/scripts/analyzer/errors/outer_class_lookup.gd | 12 ++++++++++++ .../tests/scripts/analyzer/errors/outer_class_lookup.out | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.gd create mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out (limited to 'modules/gdscript/tests/scripts/analyzer') diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.gd b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.gd new file mode 100644 index 0000000000..65c0d9dabc --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.gd @@ -0,0 +1,12 @@ +class A: + class B: + func test(): + print(A.B.D) + +class C: + class D: + pass + +func test(): + var inst = A.B.new() + inst.test() diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out new file mode 100644 index 0000000000..6baed366f6 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Cannot find member "D" in base "B". -- cgit v1.2.3