From 7eccb5883ec7e1abd2e01338c77e891ffec89d4c Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 9 May 2017 15:16:51 -0400 Subject: [PATCH] Sigh. I hate you, LuaJIT. --- test_environments.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test_environments.cpp b/test_environments.cpp index 1d00543e..bf9f087f 100644 --- a/test_environments.cpp +++ b/test_environments.cpp @@ -207,12 +207,13 @@ TEST_CASE("environments/this_environment", "test various situations of pulling o sol::state lua; - lua["f"] = [](sol::this_environment te, int x) { + lua["f"] = [](sol::this_environment te, int x, sol::this_state ts) { if (te) { sol::environment& env = te; return x + static_cast(env["x"]); } - return x; + sol::state_view lua = ts; + return x + static_cast(lua["x"]); }; sol::environment e(lua, sol::create, lua.globals());