diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-15 19:35:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-15 19:35:06 +0800 |
commit | cc9bf965fec185dd7e23fe5fe9af512f319a1d9b (patch) | |
tree | 79042ff6b640987a84e8e5bdbaee7d1ff5c13b01 /changelog.md | |
parent | c61eefc970c66da77a6428cf7ea1537e8719734a (diff) | |
download | lua-language-server-cc9bf965fec185dd7e23fe5fe9af512f319a1d9b.zip |
infer type by `local tp = type(x)`
Diffstat (limited to 'changelog.md')
-rw-r--r-- | changelog.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md index 77d12c51..3e2bdc22 100644 --- a/changelog.md +++ b/changelog.md @@ -33,6 +33,12 @@ if type(x) == 'string' then print(x) -- `x` is `string` here end + + local tp = type(x) + + if tp == 'boolean' then + print(x) -- `x` is `boolean` here + end ``` * `CHG` infer type by `>`/`<`/`>=`/`<=` * `FIX` with clients that support LSP 3.17 (VSCode), workspace diagnostics are triggered every time when opening a file. |