Where filter does not accept a Callable, produces the following errors:
test.ceylon:35: error: parameter declaration does not exist: 'line'
print(textFile.filter((line) => line.contains("Ceylon")).count());
^
test.ceylon:35: error: function or value does not exist: 'line'
print(textFile.filter((line) => line.contains("Ceylon")).count());
^
test.ceylon:35: error: function or value does not exist: 'line'
print(textFile.filter((line) => line.contains("Ceylon")).count());
^
I'd really find the first one to be a lot clearer if it said something like cannot infer parameter type: left-hand-side does not accept functions: TextFile.filter. Although left-hand-side may still be too cryptic for users but I can't think of a better term ATM.
Also, I'm pretty sure we should get rid of the duplicate (third) error.
The following call:
Where
filter
does not accept aCallable
, produces the following errors:I'd really find the first one to be a lot clearer if it said something like
cannot infer parameter type: left-hand-side does not accept functions: TextFile.filter
. Althoughleft-hand-side
may still be too cryptic for users but I can't think of a better term ATM.Also, I'm pretty sure we should get rid of the duplicate (third) error.