D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6601 - Regression(2.053): CTFE segfault taking address of function template
Summary: Regression(2.053): CTFE segfault taking address of function template
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-04 13:45 UTC by Don
Modified: 2015-06-09 05:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2011-09-04 13:45:54 UTC
Found in Phobos. It's crashing while printing an error message. Error message was printed correctly in 2.052 and earlier.
============

template curry(alias fun) {
    int curry(int arg) {
        return fun(arg, 5);
    }
}

void foo() {
    int f2(int a, int b) { return a + b; }

    enum xe = 5;
    enum fe = &curry!(f2);
    static assert(fe(6) == 11);
}