aboutsummaryrefslogtreecommitdiff
path: root/builtin/common/strict.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/common/strict.lua')
-rw-r--r--builtin/common/strict.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/common/strict.lua b/builtin/common/strict.lua
index 05ceadf7a..23ba3d727 100644
--- a/builtin/common/strict.lua
+++ b/builtin/common/strict.lua
@@ -5,6 +5,9 @@ local WARN_INIT = false
function core.global_exists(name)
+ if type(name) ~= "string" then
+ error("core.global_exists: " .. tostring(name) .. " is not a string")
+ end
return rawget(_G, name) ~= nil
end