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



--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2013-10-10 18:26:27 PDT ---
Slightly verified test case.
1. Remove UFCS in order to compile the code by using old compiler.
2. Add dummy return type 'int' to parsePrimaryExpression function.

Compilation succeeds until 2.059. but with 2.060 and later, it causes "cannot
access frame of function" error.

auto lex(R)(R ) {
    struct Lexer {
        int t;
        @property
        auto front() { return t; }
    }
    auto lexer = Lexer();
    return lexer;
}

auto flattenMixin() {
    auto trange = lex('\0');
    parsePrimaryExpression(trange);
}

int parsePrimaryExpression(R)(R trange) {
    parseAmbiguous!(/*delegate*/(parsed) {
        trange.front;
    })(trange);
    return 1;
}

typeof(handler(null)) parseAmbiguous(alias handler, R)(R trange) {
    return handler(parsePrimaryExpression(trange));
}

void main() {}

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

Reply via email to