File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44<!-- 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+ ```
514
615## 3.13.5
716` 2024-12-20 `
Original file line number Diff line number Diff line change @@ -54,12 +54,13 @@ EChar <- 'a' -> ea
5454 / ([0-9] [0-9]? [0-9]?) -> Char10
5555 / ('u{' {X16*} '}') -> CharUtf8
5656Symbol <- ({} {
57- [:|,;<>()?+#{}. *]
57+ [:|,;<>()?+#{}*]
5858 / '[]'
5959 / '...'
6060 / '['
6161 / ']'
6262 / '-' !'-'
63+ / '.' !'..'
6364 } {})
6465 -> Symbol
6566]] , {
Original file line number Diff line number Diff line change @@ -375,12 +375,12 @@ print(v1.<?bar1?>)
375375]]
376376
377377TEST [[
378- ---@class n.Foo*
378+ ---@class n.Foo.2
379379local Foo = {}
380380function Foo:bar1() end
381381
382382---@generic T
383- ---@param arg1 n.`T`*
383+ ---@param arg1 n.`T`.2
384384---@return T
385385function Generic(arg1) print(arg1) end
386386
@@ -389,12 +389,12 @@ print(v1.<?bar1?>)
389389]]
390390
391391TEST [[
392- ---@class n.Foo*
392+ ---@class n.Foo.2
393393local Foo = {}
394394function Foo:<!bar1!>() end
395395
396396---@generic T
397- ---@param arg1 n.`T`*
397+ ---@param arg1 n.`T`.2
398398---@return T
399399function Generic(arg1) print(arg1) end
400400
You can’t perform that action at this time.
0 commit comments