member_info_inheritance.gd 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # GH-82169
  2. const Utils = preload("../../utils.notest.gd")
  3. class A:
  4. static var test_static_var_a1
  5. static var test_static_var_a2
  6. var test_var_a1
  7. var test_var_a2
  8. static func test_static_func_a1(): pass
  9. static func test_static_func_a2(): pass
  10. func test_func_a1(): pass
  11. func test_func_a2(): pass
  12. signal test_signal_a1()
  13. signal test_signal_a2()
  14. class B extends A:
  15. static var test_static_var_b1
  16. static var test_static_var_b2
  17. var test_var_b1
  18. var test_var_b2
  19. static func test_static_func_b1(): pass
  20. static func test_static_func_b2(): pass
  21. func test_func_b1(): pass
  22. func test_func_b2(): pass
  23. signal test_signal_b1()
  24. signal test_signal_b2()
  25. func test():
  26. var b := B.new()
  27. for property in (B as GDScript).get_property_list():
  28. if str(property.name).begins_with("test_"):
  29. print(Utils.get_property_signature(property, true))
  30. print("---")
  31. for property in b.get_property_list():
  32. if str(property.name).begins_with("test_"):
  33. print(Utils.get_property_signature(property))
  34. print("---")
  35. for method in b.get_method_list():
  36. if str(method.name).begins_with("test_"):
  37. print(Utils.get_method_signature(method))
  38. print("---")
  39. for method in b.get_signal_list():
  40. if str(method.name).begins_with("test_"):
  41. print(Utils.get_method_signature(method, true))