diff options
| author | BooksBaum <15612932+Booksbaum@users.noreply.github.com> | 2023-07-28 17:06:08 +0200 |
|---|---|---|
| committer | ryanabx <ryanbrue@hotmail.com> | 2023-09-11 09:46:34 -0500 |
| commit | 0202a36a7a0eb76dec9814728e30e00074dc7bb2 (patch) | |
| tree | 1628450e38be206c3b951652a7934f5a740c2888 /modules/gdscript/tests/scripts/lsp/local_variables.notest.gd | |
| parent | 221884e6bc260c38f16422081b7d4efd49a71375 (diff) | |
| download | redot-engine-0202a36a7a0eb76dec9814728e30e00074dc7bb2.tar.gz | |
Language Server: Improve hovered symbol resolution, fix renaming bugs, implement reference lookup
Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com>
Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
Diffstat (limited to 'modules/gdscript/tests/scripts/lsp/local_variables.notest.gd')
| -rw-r--r-- | modules/gdscript/tests/scripts/lsp/local_variables.notest.gd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/lsp/local_variables.notest.gd b/modules/gdscript/tests/scripts/lsp/local_variables.notest.gd new file mode 100644 index 0000000000..b6cc46f7da --- /dev/null +++ b/modules/gdscript/tests/scripts/lsp/local_variables.notest.gd @@ -0,0 +1,25 @@ +extends Node + +var member := 2 +# ^^^^^^ member -> member + +func test_member() -> void: + var test := member + 42 + # | | ^^^^^^ -> member + # ^^^^ test -> test + test += 3 + #<^^ -> test + member += 5 + #<^^^^ -> member + test = return_arg(test) + # | ^^^^ -> test + #<^^ -> test + print(test) + # ^^^^ -> test + +func return_arg(arg: int) -> int: +# ^^^ arg -> arg + arg += 2 + #<^ -> arg + return arg + # ^^^ -> arg
\ No newline at end of file |
