summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/operator.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/vm/operator.lua b/script/vm/operator.lua
index 69340648..de2c3243 100644
--- a/script/vm/operator.lua
+++ b/script/vm/operator.lua
@@ -95,6 +95,10 @@ function vm.runOperator(op, exp, value)
local node = vm.compileNode(exp)
local result
for c in node:eachObject() do
+ if c.type == 'string'
+ or c.type == 'doc.type.string' then
+ c = vm.declareGlobal('type', 'string')
+ end
if c.type == 'global' and c.cate == 'type' then
---@cast c vm.global
for _, set in ipairs(c:getSets(uri)) do