Skip to content

Commit f1a974b

Browse files
committed
1 parent 05555be commit f1a974b

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

script/core/noder.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,8 @@ compileNodeMap = util.switch()
11761176
end
11771177
end
11781178
if source.args then
1179+
local parent = source.parent
1180+
local parentID = guide.isSet(parent) and getID(parent)
11791181
for i, arg in ipairs(source.args) do
11801182
if arg[1] == 'self' then
11811183
goto CONTINUE
@@ -1192,12 +1194,26 @@ compileNodeMap = util.switch()
11921194
, PARAM_NAME
11931195
, arg[1]
11941196
))
1197+
if parentID then
1198+
pushForward(noders, getID(arg), sformat('%s%s%s'
1199+
, parentID
1200+
, PARAM_NAME
1201+
, arg[1]
1202+
))
1203+
end
11951204
else
11961205
pushForward(noders, getID(arg), sformat('%s%s%s'
11971206
, id
11981207
, PARAM_NAME
11991208
, '...'
12001209
))
1210+
if parentID then
1211+
pushForward(noders, getID(arg), sformat('%s%s%s'
1212+
, parentID
1213+
, PARAM_NAME
1214+
, '...'
1215+
))
1216+
end
12011217
end
12021218
::CONTINUE::
12031219
end

test/type_inference/init.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,9 @@ for _, a in ipairs(v) do
872872
end
873873
]]
874874

875-
--TEST 'number' [[
876-
-----@param x number
877-
--local f
878-
--
879-
--f = function (<?x?>) end
880-
--]]
875+
TEST 'number' [[
876+
---@param x number
877+
local f
878+
879+
f = function (<?x?>) end
880+
]]

0 commit comments

Comments
 (0)