Skip to content
0.2.0-dev Download ZIP
28 lines ·576 B Raw
1class Outer:
2 const OUTER_CONST := 0
3 class Inner:
4 pass
5
6func subtest_type_hard():
7 var type := Outer.Inner
8 print(type.OUTER_CONST)
9
10func subtest_type_weak():
11 var type := Outer.Inner
12 var type_v: Variant = type
13 print(type_v.OUTER_CONST)
14
15func subtest_instance_hard():
16 var instance := Outer.Inner.new()
17 print(instance.OUTER_CONST)
18
19func subtest_instance_weak():
20 var instance := Outer.Inner.new()
21 var instance_v: Variant = instance
22 print(instance_v.OUTER_CONST)
23
24func test():
25 subtest_type_hard()
26 subtest_type_weak()
27 subtest_instance_hard()
28 subtest_instance_weak()