[Issue 3397] New: Unintended function call to static opCall
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Oct 14 06:27:15 PDT 2009
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=3397
           Summary: Unintended function call to static opCall
           Product: D
           Version: 1.048
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: moritzwarning at web.de
--- Comment #0 from Moritz Warning <moritzwarning at web.de> 2009-10-14 06:27:15 PDT ---
Tested with DMD 1.049 and svn r208.
It's a blocker for Tango.
Error: cannot implicitly convert expression (stack.pop()) of type Pair!(uint)
to uint
struct Pair(T)
{
    static Pair opCall(T a, T b)
    {
        return Pair.init;
    }
}
struct Stack(T)
{
    T pop()
    {
        return T.init;
    }
}
void main()
{
    Stack!(Pair!(uint)) stack;
    Pair!(uint) item = stack.pop; //this line fails, works with stack.pop() or
auto
}
-- 
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