//! > Test constructor with variables that don't exist.
//! > test_runner_name
test_function_diagnostics
//! > function_code
fn foo() {
let _x = MyStruct { a, b, a: 3 };
}
//! > function_name
foo
//! > module_code
struct MyStruct {
a: usize,
b: usize,
}
//! > expected_diagnostics
error[E2047]: Variable "a" not found.
--> lib.cairo:6:25
let _x = MyStruct { a, b, a: 3 };
^
error[E2047]: Variable "b" not found.
--> lib.cairo:6:28
let _x = MyStruct { a, b, a: 3 };
^
error[E2021]: Member specified more than once.
--> lib.cairo:6:31
let _x = MyStruct { a, b, a: 3 };
^