[Issue 9515] New: UFCS fails with local aliases

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 14 20:37:16 PST 2013


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: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 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: -------


More information about the Digitalmars-d-bugs mailing list