fuzion icon indicating copy to clipboard operation
fuzion copied to clipboard

Strange error for lambda containing loop

Open fridis opened this issue 3 months ago • 0 comments

This code

_ := p->
    for i in 1..
    until true then "." else "@"

produces a strange error that contains type **error**.

 > ../clean/fuzion.5/build/bin/fz mandel_error.fz

<source position not available>: error 1: Incompatible types in cases of match expression
Incompatible result types in different branches:
blocks return values of type '**error**' at /home/fridi/fuzion/fuzion/mandel_error.fz:2:5:
    for i in 1..

and at /home/fridi/fuzion/fuzion/mandel_error.fz:3:25:
    until true then "." else "@"


one error.

The error message should not contain type **error**, it should not talk about a match while there is none in the source code.

fridis avatar Sep 24 '25 07:09 fridis