[Issue 5073] wrong file name in error message for "voids have no value" inside alias templates (affects std.algorithm.map)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 16 14:20:18 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5073



--- Comment #2 from Andrei Alexandrescu <andrei at metalanguage.com> 2011-01-16 14:18:23 PST ---
(In reply to comment #1)
> In DMD 2.051, this error message has ceased to be generated for certain inputs
> and instead a runtime access violation is generated. Here is a reduced test
> case:
> 
> struct Bar(T) {
>     T x;
>     Bar dot(Bar b) { return Bar(x+b.x); }
> }
> 
> void main(string[] args) {
>     Bar!real   b;
>     Bar!real[] data = new Bar!real[5];
>     auto foobar  = map!((a){return a.dot(b); })(data);
>     return;
> }

I just tried the example above with 2.051. It compiles and runs. Could you
please provide a different example? Thanks!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list