2011-08-02 22:46:36 -05:00
|
|
|
// Preserve semicolons that disambiguate unops
|
|
|
|
|
|
|
|
fn f() { }
|
|
|
|
|
2011-08-19 17:16:48 -05:00
|
|
|
fn block_semi() -> int { { f() }; -1 }
|
|
|
|
|
2012-01-04 23:37:02 -06:00
|
|
|
fn block_nosemi() -> int { ({ 0 }) - 1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
|
|
|
fn if_semi() -> int { if true { f() } else { f() }; -1 }
|
|
|
|
|
2012-01-04 23:37:02 -06:00
|
|
|
fn if_nosemi() -> int { (if true { 0 } else { 0 }) - 1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2012-08-06 14:34:08 -05:00
|
|
|
fn alt_semi() -> int { match check true { true => { f() } }; -1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
2012-08-06 14:34:08 -05:00
|
|
|
fn alt_no_semi() -> int { (match check true { true => { 0 } }) - 1 }
|
2011-08-19 17:16:48 -05:00
|
|
|
|
|
|
|
fn stmt() { { f() }; -1; }
|