[Issue 10807] New: Strange error message with template, __trait and property syntax
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 12 04:29:16 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10807
Summary: Strange error message with template, __trait and
property syntax
Product: D
Version: future
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: doob at me.com
--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-08-12 04:29:14 PDT ---
The following code:
class A
{
void size () ()
{
__traits(foo);
}
}
void main ()
{
auto a = new A;
a.size;
}
Gives the following compile error:
Error: cannot resolve type for a.size()()
Error: dottd has no effect in expression (a.size()())
As far as I know "dottd" is an internal name in the compiler.
If I add a pair of parentheses to the call to "size" or if the method is not a
template method the correct error message appears:
Error: unrecognized trait foo
Error: long has no effect in expression (false)
Error: template instance main.A.size!() error instantiating
--
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