[Issue 7815] Mixin template forward reference (?) regression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 7 17:21:42 PDT 2012


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


David Simcha <dsimcha at yahoo.com> changed:

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


--- Comment #3 from David Simcha <dsimcha at yahoo.com> 2012-04-07 17:22:21 PDT ---
I reduced the case where it's still failing, reopened.

enum Closure {
    Matrix
}

struct BasicMatrix {
    mixin Operand!( Closure.Matrix );
}

template Operand( Closure closure_ ) {
    alias closure_ closure;
}

struct Expression( string op_, Lhs, Rhs = void ) {
    enum lhsClosure = closureOf!Lhs;
}

template closureOf( T ) {
    enum closureOf = T.closure;
}

alias Expression!("+", BasicMatrix) Foo;


test.d(18): Error: no property 'closure' for type 'BasicMatrix'
test.d(14): Error: template instance test.closureOf!(BasicMatrix) error
instantiating
test.d(21):        instantiated from here: Expression!("+",BasicMatrix)
test.d(21): Error: template instance test.Expression!("+",BasicMatrix) error
instantiating

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


More information about the Digitalmars-d-bugs mailing list