2021-10-12 14:49:06 +00:00
|
|
|
class A:
|
2022-12-26 16:24:17 +00:00
|
|
|
var x = 3
|
2021-10-12 14:49:06 +00:00
|
|
|
|
|
|
|
class B:
|
2022-12-26 16:24:17 +00:00
|
|
|
var x = 4
|
2021-10-12 14:49:06 +00:00
|
|
|
|
|
|
|
class C:
|
2022-12-26 16:24:17 +00:00
|
|
|
var x = 5
|
2021-10-12 14:49:06 +00:00
|
|
|
|
|
|
|
class Test:
|
2022-12-26 16:24:17 +00:00
|
|
|
var a = A.new()
|
|
|
|
var b: B = B.new()
|
|
|
|
var c := C.new()
|
2021-10-12 14:49:06 +00:00
|
|
|
|
|
|
|
func test():
|
2022-12-26 16:24:17 +00:00
|
|
|
var test_instance := Test.new()
|
|
|
|
prints(test_instance.a.x)
|
|
|
|
prints(test_instance.b.x)
|
|
|
|
prints(test_instance.c.x)
|