2021-07-16 13:20:36 +03:00
|
|
|
/*
|
|
|
|
namespace: Compile
|
|
|
|
expectation: Pass
|
|
|
|
input_file: input/dummy.in
|
|
|
|
*/
|
|
|
|
|
|
|
|
circuit Foo {
|
2021-08-25 18:55:26 +03:00
|
|
|
x: u32;
|
2021-07-16 13:20:36 +03:00
|
|
|
|
2021-08-25 18:55:26 +03:00
|
|
|
function new() -> Self {
|
|
|
|
let new: Self = Self {
|
|
|
|
x: 1u32
|
|
|
|
};
|
2021-07-16 13:20:36 +03:00
|
|
|
|
2021-08-25 18:55:26 +03:00
|
|
|
return new;
|
|
|
|
}
|
2021-07-16 13:20:36 +03:00
|
|
|
|
2021-08-25 18:55:26 +03:00
|
|
|
function etc() {
|
|
|
|
let y = [0u32, 1, 2, 3];
|
|
|
|
y[Self {x: 0}.x] += 2;
|
|
|
|
}
|
|
|
|
|
2021-09-08 14:18:11 +03:00
|
|
|
function func(a: [Self; 3], y: (Self)) {
|
2021-08-25 18:55:26 +03:00
|
|
|
const x: Self = Foo {x: Self {x: 1}.x};
|
|
|
|
}
|
|
|
|
|
|
|
|
function self_circ(x: Self) {}
|
2021-07-16 13:20:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function main(y: bool) -> bool {
|
2021-08-25 18:55:26 +03:00
|
|
|
let foo: Foo = Foo::new();
|
|
|
|
return foo.x == 1u32 && y;
|
2021-07-16 13:20:36 +03:00
|
|
|
}
|