https://d.puremagic.com/issues/show_bug.cgi?id=11907
Summary: No undeclared identifier error in lambda alias
argument
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Peter Alexander <[email protected]> 2014-01-12
03:02:46 PST ---
void f(alias a)() if (is(typeof(a()))) {}
void main()
{
f!(x => blarg);
}
This gives the error:
foo.d(5): Error: template instance f!((x) => blarg) does not match template
declaration f(alias a)() if (is(typeof(a())))
Ideally, the error would be:
foo.d(5): Error: undeclared identifier 'blarg'
This comes up all the time when using predicates on Phobos functions when you
forget an import or just have a typo.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------