Reformat for new syntax
This commit is contained in:
parent
0e3ee39c41
commit
df7f21db09
723 changed files with 28622 additions and 31631 deletions
|
@ -5,13 +5,13 @@
|
|||
|
||||
// Tests for if as expressions returning structural types
|
||||
fn test_rec() {
|
||||
auto rs = if (true) { rec(i=100) } else { rec(i=101) };
|
||||
assert (rs == rec(i=100));
|
||||
let rs = if true { {i: 100} } else { {i: 101} };
|
||||
assert (rs == {i: 100});
|
||||
}
|
||||
|
||||
fn test_tag() {
|
||||
tag mood { happy; sad; }
|
||||
auto rs = if (true) { happy } else { sad };
|
||||
let rs = if true { happy } else { sad };
|
||||
assert (rs == happy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue