Merge pull request #107936 from mihe/missing-await-warning

Add opt-in GDScript warning for when calling coroutine without `await`
This commit is contained in:
Thaddeus Crews
2025-09-30 18:35:05 -05:00
8 changed files with 29 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
func coroutine() -> void:
@warning_ignore("redundant_await")
await 0
func test():
await coroutine()
coroutine()

View File

@@ -0,0 +1,2 @@
GDTEST_OK
~~ WARNING at line 7: (MISSING_AWAIT) "await" keyword might be desired because the expression is a coroutine.