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

[REG2.064a] fix issue 10617 - contract with -profile -debug is not nothrow #2516

Merged
merged 1 commit into from
Sep 3, 2013

Conversation

hpohl
Copy link
Contributor

@hpohl hpohl commented Sep 2, 2013

@9rnsr
Copy link
Contributor

9rnsr commented Sep 3, 2013

Looks good. But I found an adjacent bug (this is not direct part of the regression).

class Foo
{
    void func() nothrow pure @safe
    in {} out {} body {}
}

class Bar : Foo
{
    override void func()    // inherits attributes of Foo.func
    in {} out {} body {}
}

Even if your patch applied, Bar.func still reports "cannot call xxx function" error.
The reason is the two calls of findVtblIndex in FuncDeclaration::semantic. It would modify the type field if a derived method inherits the attributes of its base method (This is documented behavior. Read http://dlang.org/function#virtual-functions if you interest). But it is not reflected to the local variable TypeFunction *f.

@WalterBright
Copy link
Member

Kenji, I created a bug report for your comment: http://d.puremagic.com/issues/show_bug.cgi?id=10953

WalterBright added a commit that referenced this pull request Sep 3, 2013
[REG2.064a] fix issue 10617 - contract with -profile -debug is not nothrow
@WalterBright WalterBright merged commit 3220782 into dlang:master Sep 3, 2013
@9rnsr
Copy link
Contributor

9rnsr commented Sep 3, 2013

@WalterBright Thanks for the report, and merging this. I'll open another PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants