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

19 lines
241 B
Perl

--the zero line
M = {}
struct M.B {a : int, b : int}
terra M.B:foo(a : int)
return self.a + a
end
terra rify()
var a = M.B { 1,2}
return a
end
terra bar()
return (rify()):foo(3)
end
test = require("test")
test.eq(bar(),4)