diff options
author | George Marques <george@gmarqu.es> | 2021-09-21 14:38:14 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-09-21 14:38:14 -0300 |
commit | 262d6c6befdf627cbaee9d143b1521f9f3464b6c (patch) | |
tree | 6ac45e784fed2a86e5070b7bf7fe8070033d3eba /modules/gdscript/tests/scripts | |
parent | db028ac7001cca42c9f61cc231e2363ae884e70a (diff) |
GDScript: Show specific error when "yield" is used
To help people porting code, it gives a hint to use "await" instead of a
generic error.
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd | 6 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd new file mode 100644 index 0000000000..7862eff6ec --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd @@ -0,0 +1,6 @@ +#GDTEST_PARSER_ERROR + +signal event + +func test(): + yield("event") diff --git a/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out new file mode 100644 index 0000000000..36cb699e92 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out @@ -0,0 +1,2 @@ +GDTEST_PARSER_ERROR +"yield" was removed in Godot 4.0. Use "await" instead. |