[Issue 7811] New: D2 beta outputs "not a property" error instead of real error on UFCS array template property
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 2 09:20:56 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7811
Summary: D2 beta outputs "not a property" error instead of real
error on UFCS array template property
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: schveiguy at yahoo.com
--- Comment #0 from Steven Schveighoffer <schveiguy at yahoo.com> 2012-04-02 09:21:28 PDT ---
Beta version for 2.059 release.
This code has an error in it:
void main()
{
int[] x;
assert(x.l == null);
}
@property immutable(T*) l(T)(T[] t)
{
return t.ptr;
}
However, the error reported by dmd beta is:
Error: not a property x.l
If I remove @property:
void main()
{
int[] x;
assert(x.l() == null);
}
immutable(T*) l(T)(T[] t)
{
return t.ptr;
}
I get the true error:
Error: cannot implicitly convert expression (cast(int*)t) of type int* to
immutable(int*)
Error: template instance l!(int) 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