Add a coder test case for empty records
@@ -800,6 +800,13 @@ describe("Pallene coder /", function()
function make_gc(x: {integer}): Gc
return { x = x }
end
+
+ record Empty
+ end
+
+ function make_empty(): Empty
+ return {}
+ end
]]))
it("create records", function()
@@ -843,6 +850,13 @@ describe("Pallene coder /", function()
]])
end)
+ it("create empty records", function()
+ run_test([[
+ local x = test.make_empty()
+ assert("userdata" == type(x))
+ ]])
+ end)
+
it("protect record metatables", function()
run_test([[
local x = test.make_prim(123)
