mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
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:
@@ -0,0 +1,7 @@
|
||||
func coroutine() -> void:
|
||||
@warning_ignore("redundant_await")
|
||||
await 0
|
||||
|
||||
func test():
|
||||
await coroutine()
|
||||
coroutine()
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_OK
|
||||
~~ WARNING at line 7: (MISSING_AWAIT) "await" keyword might be desired because the expression is a coroutine.
|
||||
Reference in New Issue
Block a user