Merge pull request #72677 from dalexeev/gds-await-infer-type
GDScript: Fix `await` type inference
This commit is contained in:
commit
c0edea37ef
5 changed files with 33 additions and 13 deletions
|
|
@ -0,0 +1,15 @@
|
|||
func coroutine() -> int:
|
||||
@warning_ignore("redundant_await")
|
||||
await 0
|
||||
return 1
|
||||
|
||||
func not_coroutine() -> int:
|
||||
return 2
|
||||
|
||||
func test():
|
||||
var a := await coroutine()
|
||||
@warning_ignore("redundant_await")
|
||||
var b := await not_coroutine()
|
||||
@warning_ignore("redundant_await")
|
||||
var c := await 3
|
||||
prints(a, b, c)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_OK
|
||||
1 2 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue