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'
Comment #1 by k.hara.pg — 2013-03-10T07:57:04Z
Comment #2 by k.hara.pg — 2013-03-10T07:58:48Z
*** Issue 9675 has been marked as a duplicate of this issue. ***
Comment #3 by github-bugzilla — 2013-03-10T11:44:08Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c4940e0a61d88644b1b7f15b3db631bbeac4345c fix Issue 9672 - mixin within cyclic import causes undefined properties https://github.com/D-Programming-Language/dmd/commit/6ae83db963fb8e38b100c71d331803da531c0b93 Merge pull request #1734 from 9rnsr/fix9672 [REG2.063a] Issue 9672 - mixin within cyclic import causes undefined properties