[Issue 10546] New: UFCS hides actual static assert failure in opDispatch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 4 23:19:20 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10546
Summary: UFCS hides actual static assert failure in opDispatch
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-07-04 23:19:18 PDT ---
From: http://forum.dlang.org/post/zxhvyfitqkbvmfseyqxr@forum.dlang.org
struct Fail1
{
void opDispatch(string s)()
{
static assert(false, "Tried to call a method on Fail1");
}
}
struct Fail2
{
void opDispatch(string s, T)(T arg)
{
static assert(false, "Tried to call a method on Fail2");
}
}
void main()
{
auto fail1 = Fail1();
fail1.s(); // "no property" error instead of static asset failure
auto fail2 = Fail2();
fail2.s(1); // "no property" error instead of static asset failure
}
--
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