Summary: purity inference failure with opAssign and alias this
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Nils <> 2012-10-29 02:36:33 PDT 
cat > test.d <<CODE
struct S() { // needs to be a template to trigger the bug
    void impl()(int) {} // template for purity inference

    // unused, needed to trigger the bug:
    int i;
    alias i this;
    alias impl opAssign;

pure void p() {
    S!() s;

alias S!() Dummy; // unused, needed to trigger the bug
dmd -c -o- test.d
test.d(12): Error: pure function 'p' cannot call impure function 'impl'

Looks like alias this and opAssign clash somehow.

Works with 2.060. Fails since this commit:

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to