2022-12-18 05:38:53 +00:00
|
|
|
signal hello
|
|
|
|
|
|
|
|
func get_signal() -> Signal:
|
2022-12-26 16:24:17 +00:00
|
|
|
return hello
|
2022-12-18 05:38:53 +00:00
|
|
|
|
|
|
|
class A:
|
2022-12-26 16:24:17 +00:00
|
|
|
signal hello
|
2022-12-18 05:38:53 +00:00
|
|
|
|
2022-12-26 16:24:17 +00:00
|
|
|
func get_signal() -> Signal:
|
|
|
|
return hello
|
2022-12-18 05:38:53 +00:00
|
|
|
|
2022-12-26 16:24:17 +00:00
|
|
|
class B:
|
|
|
|
signal hello
|
2022-12-18 05:38:53 +00:00
|
|
|
|
2022-12-26 16:24:17 +00:00
|
|
|
func get_signal() -> Signal:
|
|
|
|
return hello
|
2022-12-18 05:38:53 +00:00
|
|
|
|
|
|
|
class C extends A.B:
|
2022-12-26 16:24:17 +00:00
|
|
|
func get_signal() -> Signal:
|
|
|
|
return hello
|
2022-12-18 05:38:53 +00:00
|
|
|
|
|
|
|
func test():
|
2022-12-26 16:24:17 +00:00
|
|
|
var a: = A.new()
|
|
|
|
var b: = A.B.new()
|
|
|
|
var c: = C.new()
|
|
|
|
|
|
|
|
var hello_a_result: = hello == a.get_signal()
|
|
|
|
var hello_b_result: = hello == b.get_signal()
|
|
|
|
var hello_c_result: = hello == c.get_signal()
|
|
|
|
var a_b_result: = a.get_signal() == b.get_signal()
|
|
|
|
var a_c_result: = a.get_signal() == c.get_signal()
|
|
|
|
var b_c_result: = b.get_signal() == c.get_signal()
|
|
|
|
var c_c_result: = c.get_signal() == c.get_signal()
|
|
|
|
|
|
|
|
print("hello == A.hello? %s" % hello_a_result)
|
|
|
|
print("hello == A.B.hello? %s" % hello_b_result)
|
|
|
|
print("hello == C.hello? %s" % hello_c_result)
|
|
|
|
print("A.hello == A.B.hello? %s" % a_b_result)
|
|
|
|
print("A.hello == C.hello? %s" % a_c_result)
|
|
|
|
print("A.B.hello == C.hello? %s" % b_c_result)
|
|
|
|
print("C.hello == C.hello? %s" % c_c_result)
|