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