Skip to content

Commit c67230d

Browse files
muxintangzx
authored andcommitted
add test
1 parent 0127f3c commit c67230d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/kotlin/com/tang/intellij/test/inspections/MatchFunctionSignatureTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class MatchFunctionSignatureTest : LuaInspectionsTestBase(MatchFunctionSignature
4242
end
4343
test(1<warning>)</warning>
4444
""")
45+
4546
fun testMultiReturn() = checkByText("""
4647
local function ret_nn()
4748
return 1, 2
@@ -58,4 +59,17 @@ class MatchFunctionSignatureTest : LuaInspectionsTestBase(MatchFunctionSignature
5859
acp_nn(ret_nn(), 1)
5960
acp_nn(<warning>ret_sn()</warning>, 1)
6061
""")
62+
63+
fun testParentIndex() = checkByText("""
64+
local dummy, A = 1, {}
65+
---@return number, string
66+
function A.a()
67+
return 1, "1"
68+
end
69+
---@param n number
70+
---@param s string
71+
local function acp_ns(n, s) end
72+
73+
acp_ns(A.a())
74+
""")
6175
}

0 commit comments

Comments
 (0)