//! > Test lbrace in match
//! > test_comments
// TODO(spapini): Improve diagnostics.
//! > test_function_name
get_diagnostics
//! > cairo_code
fn f() {
match MyStruct{a: 1} {
}
match x {
1 => {},
Struct{a, b: _, .., a: A::Variant(4)} => {},
x => {},
bool::False() => {}
}
}
//! > expected_diagnostics
error: Missing token TerminalMatchArrow.
--> dummy_file.cairo:2:21
match MyStruct{a: 1} {
^
error: Missing tokens. Expected an expression.
--> dummy_file.cairo:2:21
match MyStruct{a: 1} {
^
error: Missing token TerminalComma.
--> dummy_file.cairo:2:21
match MyStruct{a: 1} {
^
error: Skipped tokens. Expected: match arm.
--> dummy_file.cairo:2:21
match MyStruct{a: 1} {
^
error: Missing token TerminalMatchArrow.
--> dummy_file.cairo:2:24
match MyStruct{a: 1} {
^
error: Missing tokens. Expected an expression.
--> dummy_file.cairo:2:24
match MyStruct{a: 1} {
^
error: Missing token TerminalUnderscore.
--> dummy_file.cairo:8:19
bool::False() => {}
^