diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-19 21:14:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-19 21:14:44 +0800 |
commit | 15f76378dbe93a3cbff155c8e98f9bed59af75b0 (patch) | |
tree | 37d18868909bd3c9cbd96378af6343ee82ce92b3 /test/definition/function.lua | |
parent | 2712ffefa8275ad9039b6355846378e5f2019d38 (diff) | |
download | lua-language-server-15f76378dbe93a3cbff155c8e98f9bed59af75b0.zip |
全局变量在第一次赋值时定义
Diffstat (limited to 'test/definition/function.lua')
-rw-r--r-- | test/definition/function.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/definition/function.lua b/test/definition/function.lua new file mode 100644 index 00000000..1ef6a463 --- /dev/null +++ b/test/definition/function.lua @@ -0,0 +1,24 @@ + +TEST [[ +function <!x!> () end +<?x?> = 1 +]] + +TEST [[ +local function <!x!> () end +<?x?> = 1 +]] + +TEST [[ +local x +local function <!x!> () + <?x?> = 1 +end +]] + +TEST [[ +local <!x!> +function x() +end +<?x?> = 1 +]] |