www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9675] New: cyclic import causes forward reference to template error

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9675

           Summary: cyclic import causes forward reference to template
                    error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de



PST ---
This code works in dmd2.062, but not in current git-head:

//////////////////////////////////////
module semantic;

import interpret;

string semanticErrorValue(T)(T arg)
{
    return null;
}
//////////////////////////////////////
module interpret;

import semantic;

class ValueT(T) 
{
    void binOp()
    {
        semanticErrorValue("");
    }
}

class WCharValue : ValueT!wchar
{
    string toStr()
    {
        return null;
    }
}
//////////////////////////////////////

"dmd -c interpret.d" works, but
"dmd -c semantic.d" causes
semantic.d(5): Error: template semantic.semanticErrorValue(T)(T arg) forward
reference to template semanticErrorValue(T)(T arg)
interpret.d(9): Error: template semantic.semanticErrorValue(T)(T arg) cannot
deduce template function from argument types !()(string)

maybe related to issue 9672

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 09 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9675




PST ---
according to git bisect it is introduced by commit
67fbf5753e9d4a276c354e952ed2f888efcb714c

fix Issue 7511 - attribute inference does not work for methods of templated
aggregates

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 09 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9675


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 9672 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 10 2013