summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md2
-rw-r--r--script/vm/compiler.lua3
-rw-r--r--test/type_inference/init.lua8
3 files changed, 12 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 820c4af7..247b10da 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,6 @@
# changelog
-## 3.6.26
+## 3.7.0
* `FIX` wrong hover and signature for method with varargs and overloads
* `FIX` [#2224]
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index a6b95b7c..a4147d70 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1153,6 +1153,9 @@ local compilerSwitch = util.switch()
end)
: case 'table'
: call(function (source)
+ if vm.bindAs(source) then
+ return
+ end
vm.setNode(source, source)
if source.parent.type == 'callargs' then
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 8797cfdd..9f5c8493 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -4313,3 +4313,11 @@ local x = 1
repeat
until <?x?>
]]
+
+TEST 'A' [=[
+local function f()
+ return {} --[[@as A]]
+end
+
+local <?x?> = f()
+]=]