www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9435] New: regression(head): forward reference error

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

           Summary: regression(head): forward reference error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timon.gehr gmx.ch


--- Comment #0 from timon.gehr gmx.ch 2013-01-31 13:55:53 PST ---
To reproduce: dmd semantic.d

// expression.d:
import semantic;
template Visitors(){ mixin Semantic!(typeof(this)); }
class Node{    mixin Visitors; }
class Expression: Node{ }
class BinaryExp(TokenType op): Expression{ }
// ---

// semantic.d:
import expression;
enum TokenType{Dot}
template Tok(string type){enum Tok=TokenType.Dot;}
template Semantic(T) { invariant(){ } }
template Semantic(T) if(is(T==BinaryExp!(Tok!"."))){ }
// ===

Output with dmd from head:
expression.d(4): Error: class expression.Expression unable to resolve forward
reference in definition
expression.d(5): Error: class expression.BinaryExp!(cast(TokenType)0).BinaryExp
unable to resolve forward reference in definition
expression.d(3): Error: class expression.Node unable to resolve forward
reference in definition


This worked with DMD 2.060.

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-01-31 16:47:15 PST ---
This regression is introduced by fixing bug 9276.

https://github.com/D-Programming-Language/dmd/pull/1589

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



--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-01-31 16:52:36 PST ---
*** Issue 9434 has been marked as a duplicate of this issue. ***

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


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

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


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