diff options
-rw-r--r-- | script/vm/runner.lua | 2 | ||||
-rw-r--r-- | test/type_inference/init.lua | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/script/vm/runner.lua b/script/vm/runner.lua index 3a315d5c..ed881d94 100644 --- a/script/vm/runner.lua +++ b/script/vm/runner.lua @@ -85,7 +85,7 @@ function mt:_preCompile() self.steps[#self.steps+1] = { type = 'object', object = ref, - pos = ref.start, + pos = ref.range or ref.start, } local block = guide.getParentBlock(ref) self:_compileBlock(block) diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 2352201a..36ae8711 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1759,3 +1759,8 @@ local function f(<?x?>) end ]] + +TEST 'integer' [[ +local x = 1 +x = <?x?> +]] |