www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8265] New: Pseudo member function not found when called across modules

http://d.puremagic.com/issues/show_bug.cgi?id=8265

           Summary: Pseudo member function not found when called across
                    modules
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tommitissari hotmail.com



// File: main.d
module main;

import test;

struct MyStruct
{
    int _value;

    int memberGetValue()
    {
        return _value;
    }
}

int nonMemberGetValue(MyStruct ms)
{
    return ms._value;
}

int main(string[] argv)
{



    return 0;
}

//...

// File: test.d
module test;

bool memberTest(T)(T t)
{
    return t.memberGetValue() == 42;
}

bool nonMemberTest(T)(T t)
{

}


// error instantiating



-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 19 2012