Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue 7883 - Compiler segfaults with double inheritance and function contract #2379

Merged
merged 1 commit into from Jul 26, 2013

Conversation

hpohl
Copy link
Contributor

@hpohl hpohl commented Jul 24, 2013

@@ -2179,7 +2179,7 @@ Statement *FuncDeclaration::mergeFensure(Statement *sf)
sc->pop();
}

sf = fdv->mergeFensure(sf);
sf = fdv->mergeFensure(sf, outId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r/outId/oi/ ?

testcase:

class A
{
    int foo()
    out (r1) { }
    body { return 1; }
}

class B : A
{
    override int foo()  // line 11
    out (r2) { }
    body { return 1; }
}

class C : B
{
    override int foo()
    out (r3) { }
    body { return 1; }
}

class D : C
{
    override int foo()
    out (r4) { }
    body { return 1; }
}

output:

test.d(11): Error: undefined identifier r3, did you mean variable r4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r/outId/oi/ ?

Of course, it was there at some time before but for somehow I replaced it again. Added the testcase.

@hpohl
Copy link
Contributor Author

hpohl commented Jul 25, 2013

Updated.

9rnsr added a commit that referenced this pull request Jul 26, 2013
fix issue 7883 - Compiler segfaults with double inheritance and function contract
@9rnsr 9rnsr merged commit ba1ed2c into dlang:master Jul 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants