godot/modules/gdscript/tests/scripts/runtime/features/await_without_coroutine.gd
George Marques 056a54db7b
GDScript: Properly return value with await on non-coroutine
If the keyword `await` is used without a coroutine, it should still
return the value synchronally.
2021-10-14 19:58:10 -03:00

9 lines
138 B
GDScript

# https://github.com/godotengine/godot/issues/50894
func test():
print(await not_coroutine())
func not_coroutine():
return "awaited"