[Issue 10038] New: Poor error for undefined variable in template args using UFCS on UDT
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 7 09:48:19 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10038
Summary: Poor error for undefined variable in template args
using UFCS on UDT
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: peter.alexander.au at gmail.com
--- Comment #0 from Peter Alexander <peter.alexander.au at gmail.com> 2013-05-07 09:48:17 PDT ---
--------------------------------
struct S {}
int foo(alias A)(S s) { return 1; }
int baderror = S().foo!(X);
--------------------------------
Error is:
bug.d(3): Error: no property 'foo' for type 'S'
Ideally would be:
bug.d(3): Error: undefined identifier X.
This can be quite problematic in large UFCS chain expressions, like what you
get when using ranges. A small typo can take quite a while to track down with
the current diagnostics.
--
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