Fridtjof Siebert
Fridtjof Siebert
I ran into this during [part 1 of the dec 9 Advent of Code](https://github.com/fridis/fuzion_aoc/blob/main/2024/09/part1.fz). This is a well known problem in Haskell [Avoiding ++ in Haskell](https://stackoverflow.com/questions/38627567/avoiding-in-haskell) or [Why are difference...
Try this ``` r(A type, c C) => r u8 2 ``` you get this ``` > PRECONDITIONS=true POSTCONDITIONS=true ./build/bin/fz infer_crash.fz error 1: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for...
Implicit call to `.call` does not work if type is type parameter with constraint being lambda target
Take this code using a type parameter with constraint `i32->i32`: ``` apply(f F : i32->i32) => f 42 _ := apply *2 ``` it produces an error: ``` > ./build/bin/fz...
This code ``` apply(A type, a A, f _ : A->String) => f.call a say "$x*2={x*2}" ``` produces this message ``` > ./build/bin/fz ../work/webserver/content/tutorial/examples/type_parameter_example6.fz /home/fridi/fuzion/fuzion/../work/webserver/content/tutorial/examples/type_parameter_example6.fz:7:21: error 1: Incompatible types when...
Take this example ``` # function with 3 arguments of inferred type i32, codepoint and codepoint: # line(l, start, end) => start + "-"*l + end line 20 "" |>...
Take this exmaple that is a based on the code given in #5896: ``` sum(values Sequence Any) => values.map a-> a.dynamic_apply T,v-> if T : i32 then v.as_f64 else if...
Try this ``` o(a i32) is F ref is c(a i32) i32 : fuzion.lambda_target => abstract _ F := x->x+1 # should work, but does not _ o.F := x->x+1...
lambdas targets that are defined inside the features they are used in currently do not work (since the outer type is xyz.this and the lambda will be created in xyz.fun#123)....
As part of #6005, the language server code for [lambdas was disabled](https://github.com/tokiwa-software/fuzion/pull/6005/files#diff-1aded595a59f49bde2c019f6ccfd3fcd2fb2ac6cd273794d7aef453504bc00a8). The main problem is that I did not see how to get a reference to an `Resolution` instance...
Try this code that has two ambiguous lambda targets `c` and `c`. ``` F ref is c(a i32) i32 : fuzion.lambda_target => abstract d(a i32) i32 : fuzion.lambda_target => abstract...