| 1 |
class_name TestMemberInfo |
| 2 |
|
| 3 |
class MyClass: |
| 4 |
pass |
| 5 |
|
| 6 |
enum MyEnum {} |
| 7 |
|
| 8 |
static var test_static_var_untyped |
| 9 |
static var test_static_var_weak_null = null |
| 10 |
static var test_static_var_weak_int = 1 |
| 11 |
static var test_static_var_hard_int: int |
| 12 |
|
| 13 |
var test_var_untyped |
| 14 |
var test_var_weak_null = null |
| 15 |
var test_var_weak_int = 1 |
| 16 |
@export var test_var_weak_int_exported = 1 |
| 17 |
var test_var_weak_variant_type = TYPE_NIL |
| 18 |
@export var test_var_weak_variant_type_exported = TYPE_NIL |
| 19 |
var test_var_hard_variant: Variant |
| 20 |
var test_var_hard_int: int |
| 21 |
var test_var_hard_variant_type: Variant.Type |
| 22 |
@export var test_var_hard_variant_type_exported: Variant.Type |
| 23 |
var test_var_hard_node_process_mode: Node.ProcessMode |
| 24 |
@warning_ignore("enum_variable_without_default") |
| 25 |
var test_var_hard_my_enum: MyEnum |
| 26 |
var test_var_hard_array: Array |
| 27 |
var test_var_hard_array_int: Array[int] |
| 28 |
var test_var_hard_array_variant_type: Array[Variant.Type] |
| 29 |
var test_var_hard_array_node_process_mode: Array[Node.ProcessMode] |
| 30 |
var test_var_hard_array_my_enum: Array[MyEnum] |
| 31 |
var test_var_hard_array_resource: Array[Resource] |
| 32 |
var test_var_hard_array_this: Array[TestMemberInfo] |
| 33 |
var test_var_hard_array_my_class: Array[MyClass] |
| 34 |
var test_var_hard_dictionary: Dictionary |
| 35 |
var test_var_hard_dictionary_int_variant: Dictionary[int, Variant] |
| 36 |
var test_var_hard_dictionary_variant_int: Dictionary[Variant, int] |
| 37 |
var test_var_hard_dictionary_int_int: Dictionary[int, int] |
| 38 |
var test_var_hard_dictionary_variant_type: Dictionary[Variant.Type, Variant.Type] |
| 39 |
var test_var_hard_dictionary_node_process_mode: Dictionary[Node.ProcessMode, Node.ProcessMode] |
| 40 |
var test_var_hard_dictionary_my_enum: Dictionary[MyEnum, MyEnum] |
| 41 |
var test_var_hard_dictionary_resource: Dictionary[Resource, Resource] |
| 42 |
var test_var_hard_dictionary_this: Dictionary[TestMemberInfo, TestMemberInfo] |
| 43 |
var test_var_hard_dictionary_my_class: Dictionary[MyClass, MyClass] |
| 44 |
var test_var_hard_resource: Resource |
| 45 |
var test_var_hard_this: TestMemberInfo |
| 46 |
var test_var_hard_my_class: MyClass |
| 47 |
|
| 48 |
static func test_static_func(): pass |
| 49 |
|
| 50 |
func test_func_implicit_void(): pass |
| 51 |
func test_func_explicit_void() -> void: pass |
| 52 |
func test_func_weak_null(): return null |
| 53 |
func test_func_weak_int(): return 1 |
| 54 |
func test_func_hard_variant() -> Variant: return null |
| 55 |
func test_func_hard_int() -> int: return 1 |
| 56 |
func test_func_args_1(_a: int, _b: Array[int], _c: Dictionary[int, int], _d: int = 1, _e = 2): pass |
| 57 |
func test_func_args_2(_a = 1, _b = _a, _c = [2], _d = 3): pass |
| 58 |
|
| 59 |
@warning_ignore_start("unused_signal") |
| 60 |
signal test_signal_1() |
| 61 |
signal test_signal_2(a: Variant, b) |
| 62 |
signal test_signal_3(a: int, b: Array[int], c: Dictionary[int, int]) |
| 63 |
signal test_signal_4(a: Variant.Type, b: Array[Variant.Type], c: Dictionary[Variant.Type, Variant.Type]) |
| 64 |
signal test_signal_5(a: MyEnum, b: Array[MyEnum], c: Dictionary[MyEnum, MyEnum]) |
| 65 |
signal test_signal_6(a: Resource, b: Array[Resource], c: Dictionary[Resource, Resource]) |
| 66 |
signal test_signal_7(a: TestMemberInfo, b: Array[TestMemberInfo], c: Dictionary[TestMemberInfo, TestMemberInfo]) |
| 67 |
signal test_signal_8(a: MyClass, b: Array[MyClass], c: Dictionary[MyClass, MyClass]) |
| 68 |
@warning_ignore_restore("unused_signal") |
| 69 |
|
| 70 |
func test(): |
| 71 |
var script: Script = get_script() |
| 72 |
for property in script.get_property_list(): |
| 73 |
if str(property.name).begins_with("test_"): |
| 74 |
print(Utils.get_property_signature(property, null, true)) |
| 75 |
for property in get_property_list(): |
| 76 |
if str(property.name).begins_with("test_"): |
| 77 |
print(Utils.get_property_signature(property)) |
| 78 |
for method in get_method_list(): |
| 79 |
if str(method.name).begins_with("test_"): |
| 80 |
print(Utils.get_method_signature(method)) |
| 81 |
for method in get_signal_list(): |
| 82 |
if str(method.name).begins_with("test_"): |
| 83 |
print(Utils.get_method_signature(method, true)) |