diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-04 15:46:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-04 15:46:07 +0800 |
commit | 4dddd5e97906202f772642486c6e55ae89d67f81 (patch) | |
tree | ed07c1354136332da0ae5aed46b5712879d77ac4 /server/test/type_inference | |
parent | 9eec125d9975b6ee44646d1fad0b6c406b2507a5 (diff) | |
download | lua-language-server-4dddd5e97906202f772642486c6e55ae89d67f81.zip |
简单类型腿短
Diffstat (limited to 'server/test/type_inference')
-rw-r--r-- | server/test/type_inference/init.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/test/type_inference/init.lua b/server/test/type_inference/init.lua index ef0ef001..4961b4b0 100644 --- a/server/test/type_inference/init.lua +++ b/server/test/type_inference/init.lua @@ -1,5 +1,6 @@ local parser = require 'parser' local core = require 'core' +local buildVM = require 'vm' rawset(_G, 'TEST', true) @@ -10,11 +11,11 @@ function TEST(res) local pos = (start + finish) // 2 + 1 local new_script = script:gsub('<[!?]', ' '):gsub('[!?]>', ' ') local ast = parser:ast(new_script) - local vm = core.vm(ast) + local vm = buildVM(ast) assert(vm) local result = core.findSource(vm, pos) assert(result) - assert(res == result.value:getType()) + assert(res == result:bindValue():getType()) end end |