diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-18 16:04:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 16:04:12 +0200 |
commit | e22255edaf1e48fffe71f6918814bbc2b089c278 (patch) | |
tree | 896df1a4be63b566e5554c04267bff2b861295bf /modules/gdscript/tests | |
parent | 533e364ab5a672630beeff7fded4cf99f59567c9 (diff) | |
parent | 86c0e38e8f13f7f5ac4ed30570a3ae2556b9fca7 (diff) |
Merge pull request #55201 from Scony/fix-unreachable-code-false-positive
Diffstat (limited to 'modules/gdscript/tests')
2 files changed, 18 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.gd b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.gd new file mode 100644 index 0000000000..d00d483a73 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.gd @@ -0,0 +1,16 @@ +func test(): + var foo := "bar" + match foo: + "baz": + return + _: + pass + match foo: + "baz": + return + match foo: + "bar": + pass + _: + return + print("reached") diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.out b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.out new file mode 100644 index 0000000000..47db6b631b --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.out @@ -0,0 +1,2 @@ +GDTEST_OK +reached |