godot-module-template/engine/modules/gdscript/tests/scripts/runtime/features/gdscript.gd

21 lines
356 B
GDScript
Raw Permalink Normal View History

2025-01-17 15:36:38 +00:00
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()