Skip to content

Commit c3c73ef

Browse files
committed
enable as table
#2144
1 parent b778d58 commit c3c73ef

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# changelog
22

3-
## 3.6.26
3+
## 3.7.0
44
* `FIX` wrong hover and signature for method with varargs and overloads
55
* `FIX` [#2224]
66

script/vm/compiler.lua

+3
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,9 @@ local compilerSwitch = util.switch()
11531153
end)
11541154
: case 'table'
11551155
: call(function (source)
1156+
if vm.bindAs(source) then
1157+
return
1158+
end
11561159
vm.setNode(source, source)
11571160

11581161
if source.parent.type == 'callargs' then

test/type_inference/init.lua

+8
Original file line numberDiff line numberDiff line change
@@ -4313,3 +4313,11 @@ local x = 1
43134313
repeat
43144314
until <?x?>
43154315
]]
4316+
4317+
TEST 'A' [=[
4318+
local function f()
4319+
return {} --[[@as A]]
4320+
end
4321+
4322+
local <?x?> = f()
4323+
]=]

0 commit comments

Comments
 (0)