move tests

This commit is contained in:
nora 2023-12-16 13:48:36 +01:00
parent 970b713cf6
commit 3b916d8f69
4 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,25 @@
//@check-pass
type A = struct {
b: B,
c: C,
};
type B = struct {};
type C = struct {
b: B,
};
function test(a: A): A = a;
function main() = (
let a = A {
b: B {},
c: C {
b: B {},
}
};
test(a);
);

View file

@ -0,0 +1,21 @@
//@check-pass
type A = struct { a: Int };
type Complex = struct {
a: Int,
b: (Int, A),
};
function main() = (
let a = A { a: 0 };
// let b = 0;
// let c = Complex { a: 0, b: (0, a) };
write(a);
// c.b.1.a = 1; TODO
);
function write(a: A) = a.a = 1;
function ret(): A = A { a: 0 };

View file

@ -0,0 +1,7 @@
//@check-pass
type A = (Int, Int);
function main() = (
let a: A = (0, 0);
);

View file

@ -0,0 +1,21 @@
//@check-pass
type CustomType = struct {};
function main() = ();
function assigns(
a: Int,
b: I32,
c: String,
d: Bool,
e: CustomType,
f: (Int, I32),
) = (
let a1: Int = a;
let b1: I32 = b;
let c1: String = c;
let d1: Bool = d;
let e1: CustomType = e;
let f1: (Int, I32) = f;
);