Skip to content

Commit 609e146

Browse files
committed
3.2.0
1 parent e45f4c4 commit 609e146

File tree

9 files changed

+1976
-1718
lines changed

9 files changed

+1976
-1718
lines changed

changelog.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# changelog
22

3+
## 3.2.0
4+
`2022-4-25`
5+
* `NEW` supports infer of callback parameter
6+
```lua
7+
---@type string[]
8+
local t
9+
10+
table.sort(t, function (a, b)
11+
-- `a` and `b` is `string` here
12+
end)
13+
```
14+
* `NEW` using `---@overload` as class constructor
15+
```lua
16+
---@class Class
17+
---@overload fun():Class
18+
local mt
19+
20+
local x = mt() --> x is `Class` here
21+
```
22+
* `NEW` add `--[[@as type]]`
23+
```lua
24+
local x = true
25+
local y = x--[[@as integer]] -- y is `integer` here
26+
```
27+
* `NEW` add `---@cast`
28+
* `---@cast localname type`
29+
* `---@cast localname +type`
30+
* `---@cast localname -type`
31+
* `---@cast localname +?`
32+
* `---@cast localname -?`
33+
* `NEW` generic: resolve `T[]` by `table<integer, type>` or `---@field [integer] type`
34+
* `NEW` resolve `class[1]` by `---@field [integer] type`
35+
* `NEW` diagnostic: `missing-parameter`
36+
* `NEW` diagnostic: `need-check-nil`
37+
* `CHG` diagnostic: no longer mark `redundant-parameter` as `Unnecessary`
38+
* `FIX` diagnostic: `unused-function` does not recognize recursion
39+
* `FIX` [#1051](https://github.com/sumneko/lua-language-server/issues/1051)
40+
* `FIX` [#1072](https://github.com/sumneko/lua-language-server/issues/1072)
41+
* `FIX` [#1077](https://github.com/sumneko/lua-language-server/issues/1077)
42+
* `FIX` [#1088](https://github.com/sumneko/lua-language-server/issues/1088)
43+
* `FIX` runtime errors
44+
345
## 3.1.0
446
`2022-4-17`
547
* `NEW` support find definition in method

0 commit comments

Comments
 (0)