http://d.puremagic.com/issues/show_bug.cgi?id=9515
Summary: UFCS fails with local aliases
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 Jonathan M Davis <[email protected]> 2013-02-14 20:37:15
PST ---
This code
import std.algorithm;
void main()
{
alias std.algorithm.find f;
f("hello", 'c');
"hello".f('c');
}
fails to compile, giving this error
q.d(7): Error: undefined identifier 'f'
Note that the call which doesn't use UFCS works, but the one which does fails
to compile. If the alias is moved outside of the function, then both compile.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------