We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 test\references\init.lua 中添加下面用例,会提示失败
TEST [[ ---@class Dog local mt = {} function mt:<?eat?>() end ---@class Master local mt2 = {} function mt2:init() ---@type Dog local foo = self:doSomething() ---@type Dog self.dog = getDog() end function mt2:feed() self.dog:<!eat!>() end function mt2:doSomething() end ]]
如果去掉用例其中的这2行,可以通过测试
---@type Dog local foo = self:doSomething()
在处理 searchSameFieldsCrossMethod() 穿透 self 时,因为第一处"---@type Dog" 已穿透一次,status.cache.crossMethodMark 已缓存该self。到第二处"---@type Dog"需要穿透时,因为缓存直接跳过,导致失败。
这块逻辑比较复杂,才开始看这个项目的代码。请交下作者有什么好的处理方法了?
The text was updated successfully, but these errors were encountered:
确实挺复杂的,我也要依靠调试才能理清关系,晚点研究一下
Sorry, something went wrong.
31a4c20
No branches or pull requests
1 复现方法
在 test\references\init.lua 中添加下面用例,会提示失败
如果去掉用例其中的这2行,可以通过测试
2 定位到原因
在处理 searchSameFieldsCrossMethod() 穿透 self 时,因为第一处"---@type Dog" 已穿透一次,status.cache.crossMethodMark 已缓存该self。到第二处"---@type Dog"需要穿透时,因为缓存直接跳过,导致失败。
这块逻辑比较复杂,才开始看这个项目的代码。请交下作者有什么好的处理方法了?
The text was updated successfully, but these errors were encountered: