1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

add changelog, fix merge

This commit is contained in:
dark64 2022-05-11 23:25:28 +02:00
parent 667bc8d077
commit e2bd653944
5 changed files with 11 additions and 8 deletions

View file

@ -0,0 +1 @@
Use curly braces to enclose blocks

View file

@ -1,4 +1,4 @@
// only using add, no need to flatten
def main(field a, field b) -> field {
return a + b:
return a + b;
}

View file

@ -2492,7 +2492,7 @@ impl<'ast, T: Field> Checker<'ast, T> {
Ok(StructExpression::conditional(condition, consequence, alternative).into())
},
(TypedExpression::Tuple(consequence), TypedExpression::Tuple(alternative)) => {
Ok(TupleExpression::conditional(condition, consequence, alternative, kind).into())
Ok(TupleExpression::conditional(condition, consequence, alternative).into())
},
(TypedExpression::Uint(consequence), TypedExpression::Uint(alternative)) => {
Ok(UExpression::conditional(condition, consequence, alternative).into())

View file

@ -1,3 +1,4 @@
def main(field x):
assert(x < 2)
return
def main(field x) {
assert(x < 2);
return;
}

View file

@ -1,3 +1,4 @@
def main(bool flag) -> ((field, field)):
(field, field) a = if flag then (1f, 2f) else (2f, 1f) fi
return a
def main(bool flag) -> ((field, field)) {
(field, field) a = flag ? (1f, 2f) : (2f, 1f);
return a;
}