aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/stmt_expression_value_dropped.zc
blob: b69ccaf00cc9c858355db506c95b9408dc5d2de8 (plain) (blame)
1
2
3
4
5
// expect: 2/
// spec 4.2: the value of an expression statement is dropped
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int a = 1; a + 5; a = a + 1; 7; pn(a); return 0; }