fix: acceptance test 031
Co-authored-by: rvcas <x@rvcas.dev>
This commit is contained in:
parent
083b7fcb5f
commit
010024fb95
|
@ -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())?;
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue