Current UFCS diagnostic problem
Jacob Carlborg
doob at me.com
Wed Mar 27 14:09:11 PDT 2013
On 2013-03-27 15:50, bearophile wrote:
> Currently there is a significant problem with UFCS usage, visible in
> this wrong program:
>
>
> import std.algorithm, std.array;
>
> int[] foo(R)(R data) {
> return data.map!(x => y ^^ 2).array;
> }
>
> void main() {
> auto r1 = [1, 2, 3].foo;
> }
>
>
> The latest dmd 2.063alpha gives just the error:
>
> test.d(8): Error: no property 'foo' for type 'int[]'
>
>
> dmd keeps giving the same error for lot mutations of the code of foo().
> When the code gets more complex, with some UFCS chains, debugging code
> becomes not easy. (This is already in Bugzilla). I'd like this problem
> to be somehow addressed before the release of dmd 2.063.
If think I've seen something similar. When there's an ambiguous function
call it will give the same error as above instead of giving an error
about ambiguity.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list