Closed theQuazz closed 5 years ago
Thanks for the report. This problem is already being tracked in #775, so I will close this.
@peq But shouldn't this work with inference? Or does it need the generic param? Also related to new generics? Or would this never work in the first place.
Wurst currently does not use the return type for inferring type arguments and in this case it's not even clear what the return type must be without looking at the following lines.
Here is a demonstration:
https://bin.wurstlang.org/viqegokeju.wurst
Error:
We can fix it by applying the type to the function like this:
let take2 = take<int>(2)