virtualx-engine/modules/gdscript/tests/scripts/runtime/features/gdscript.gd
2023-01-25 18:43:56 +03:00

20 lines
356 B
GDScript

func test():
var gdscr: = GDScript.new()
gdscr.source_code = '''
extends Resource
func test() -> void:
prints("Outer")
var inner = InnerClass.new()
class InnerClass:
func _init() -> void:
prints("Inner")
'''
@warning_ignore("return_value_discarded")
gdscr.reload()
var inst = gdscr.new()
@warning_ignore("unsafe_method_access")
inst.test()