Files
linguist/samples/Terra/zeroreturn.t
2016-01-28 11:22:27 +07:00

18 lines
188 B
Perl

local b = global(0)
terra foo(a : int)
if a > 3 then
return
end
b = a
end
terra getb() return b end
local test = require("test")
foo(4)
test.eq(getb(),0)
foo(2)
test.eq(getb(),2)