[Issue 4118] std.conv.to!SomeStruct("hello") crashes compiler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 1 12:20:04 PDT 2010


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



--- Comment #3 from Michel Fortin <michel.fortin at michelf.com> 2010-05-01 15:20:03 EDT ---
Ah, great. I can use it now as it no longer crashes.

But I don't think it should give an error, it should just not match the given
template.

The error you added gives a false positive in this case:

---
struct SomeStruct { }

int test(T : T[X], X)(X x) {
    return 1;
}
int test(T : SomeStruct, X)(X x) {
    return 1;
}

void main() {
    auto s = test!SomeStruct("hello");
}
---

-- 
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