fix: acceptance test 031

Co-authored-by: rvcas <x@rvcas.dev>
This commit is contained in:
Kasey White 2022-12-27 21:01:54 -05:00 committed by Lucas
parent 083b7fcb5f
commit 010024fb95
2 changed files with 2 additions and 2 deletions

View File

@ -1505,7 +1505,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
self.unify(bool(), condition.tipo(), condition.type_defining_location())?; self.unify(bool(), condition.tipo(), condition.type_defining_location())?;
let body = self.infer(first.body.clone())?; let body = self.infer(branch.body.clone())?;
self.unify(tipo.clone(), body.tipo(), body.type_defining_location())?; self.unify(tipo.clone(), body.tipo(), body.type_defining_location())?;

View File

@ -1,4 +1,4 @@
pub fn clamp(n: Int, min min: Int, max max: Int) -> Int { pub fn clamp(n: Int, min: Int, max: Int) -> Int {
if n < min { if n < min {
min min
} else if n > max { } else if n > max {