Bug 9672 – mixin within cyclic import causes undefined properties
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-09T05:46:00Z
Last change time
2013-03-10T16:59:30Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0 by r.sagitario — 2013-03-09T05:46:49Z
This code compiles with dmd 2.062, but not with git-head:
////////////////////////////////////////////////////
module interpret;
import node;
class Type
{
mixin ForwardCtor!();
}
//BasicType only created for standard types associated with tokens
class BasicType : Type
{
static Type createType()
{
return null;
}
}
class ValueT(T)
{
Type getType()
{
return BasicType.createType();
}
}
class CharValue : ValueT!char
{
string toStr()
{
return null;
}
}
////////////////////////////////////////////////////
module node;
import interpret;
mixin template ForwardCtor()
{
}
////////////////////////////////////////////////////
"dmd -c interpret.d" works.
"dmd -c node.d" causes
interpret.d(23): Error: no property 'createType' for type 'interpret.BasicType'