mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
21
samples/Terra/lazycstring.t
Normal file
21
samples/Terra/lazycstring.t
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
struct A {
|
||||
a : int
|
||||
}
|
||||
|
||||
|
||||
print(A:cstring())
|
||||
|
||||
terra foo()
|
||||
return A { 1 }
|
||||
end
|
||||
|
||||
struct B {
|
||||
a : int
|
||||
}
|
||||
|
||||
terra foo2()
|
||||
return B { 1 }
|
||||
end
|
||||
|
||||
assert(foo().a == foo2().a)
|
||||
Reference in New Issue
Block a user