Add opt-in GDScript warning for when calling coroutine without await
This commit is contained in:
parent
ebc36a7225
commit
a3e58a385f
8 changed files with 29 additions and 2 deletions
|
|
@ -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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue