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

another scoping issue with conditions #435

Closed
gavinking opened this issue Oct 13, 2012 · 0 comments
Closed

another scoping issue with conditions #435

gavinking opened this issue Oct 13, 2012 · 0 comments

Comments

@gavinking
Copy link
Member

The fix to #430 was incomplete. Consider:

void z(Void o) {
    if (is Object o) {
        class Inner() {
            Object x = o;
        }
    }
    assert (is Object o);
    class Inner() {
        Object x = o;
    }
}

This well-typed code results in two errors:

specified expression must be assignable to declared type of x: Void is not assignable to Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant