Commit b26303f5 authored by Jamie A. Jennings's avatar Jamie A. Jennings

Fixes bug where local tests of a file that does not declare a package would throw an exception

parent d861ffd5
......@@ -110,7 +110,7 @@ function, en, args, filename)
-- returns an rplx if identifier found in pkgname, or
-- false if not found, or
-- nil if found but is exported, i.e. not a local
local pkgenv = en.env:lookup(pkgname)
local pkgenv = ((not pkgname) and en.env) or en.env:lookup(pkgname)
if pkgenv then
local pat = pkgenv:lookup(identifier)
if pat then
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment