File tree 3 files changed +15
-5
lines changed
3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
<!-- Add all new changes here. They will be moved under a version at release -->
5
+ * ` CHG ` [ #3014 ] Generic pattern now supports definition after capture
6
+ ``` lua
7
+ --- @generic T
8
+ --- @param t ` T ` .Cat
9
+ --- @return T
10
+ local function f (t ) end
11
+
12
+ local t = f (' Smile' ) -- > t is `Smile.Cat`
13
+ ```
5
14
6
15
## 3.13.5
7
16
` 2024-12-20 `
Original file line number Diff line number Diff line change @@ -54,12 +54,13 @@ EChar <- 'a' -> ea
54
54
/ ([0-9] [0-9]? [0-9]?) -> Char10
55
55
/ ('u{' {X16*} '}') -> CharUtf8
56
56
Symbol <- ({} {
57
- [:|,;<>()?+#{}. *]
57
+ [:|,;<>()?+#{}*]
58
58
/ '[]'
59
59
/ '...'
60
60
/ '['
61
61
/ ']'
62
62
/ '-' !'-'
63
+ / '.' !'..'
63
64
} {})
64
65
-> Symbol
65
66
]] , {
Original file line number Diff line number Diff line change @@ -375,12 +375,12 @@ print(v1.<?bar1?>)
375
375
]]
376
376
377
377
TEST [[
378
- ---@class n.Foo*
378
+ ---@class n.Foo.2
379
379
local Foo = {}
380
380
function Foo:bar1() end
381
381
382
382
---@generic T
383
- ---@param arg1 n.`T`*
383
+ ---@param arg1 n.`T`.2
384
384
---@return T
385
385
function Generic(arg1) print(arg1) end
386
386
@@ -389,12 +389,12 @@ print(v1.<?bar1?>)
389
389
]]
390
390
391
391
TEST [[
392
- ---@class n.Foo*
392
+ ---@class n.Foo.2
393
393
local Foo = {}
394
394
function Foo:<!bar1!>() end
395
395
396
396
---@generic T
397
- ---@param arg1 n.`T`*
397
+ ---@param arg1 n.`T`.2
398
398
---@return T
399
399
function Generic(arg1) print(arg1) end
400
400
You can’t perform that action at this time.
0 commit comments