From 6aa90f4667b8470fe80889e5fe0f9ab4f96ae86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 28 Apr 2021 19:56:28 +0800 Subject: generic --- test/basic/linker.txt | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'test/basic') diff --git a/test/basic/linker.txt b/test/basic/linker.txt index 5d3f54e8..ea3ba180 100644 --- a/test/basic/linker.txt +++ b/test/basic/linker.txt @@ -113,8 +113,29 @@ local = f() ``` l:r -s:1#1 -l:f#1 -dg:T -l:f@1 -k +s:1#1 call +l:f#1 call +f:1#1 call -> f:1&T = l:k +l:f@1 --> 从保存的call信息里找到 f:1&T = l:k +l:k + + + +``` +---@generic T, V +---@param p T +---@return fun(V):T, V +local function f(p) end + +local f2 = f() +local = f2() +``` + +l:r +s:2|#1 call1 +l:f2|#1 call1 +f:2|#1 call1 +s:1#1|#1 call2 +f:1#1|#1 call2 -> f:1&T = l:k +dfun:1|#1 +dn:V -> f:1&T = l:k -- cgit v1.2.3