summaryrefslogtreecommitdiff
path: root/script/vm/infer.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/infer.lua')
-rw-r--r--script/vm/infer.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/script/vm/infer.lua b/script/vm/infer.lua
index 94538a79..263b2500 100644
--- a/script/vm/infer.lua
+++ b/script/vm/infer.lua
@@ -477,7 +477,14 @@ function mt:viewLiterals()
if #literals == 0 then
return nil
end
- table.sort(literals)
+ table.sort(literals, function (a, b)
+ local sa = inferSorted[a] or 0
+ local sb = inferSorted[b] or 0
+ if sa == sb then
+ return a < b
+ end
+ return sa < sb
+ end)
return table.concat(literals, '|')
end