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 initial store ignoring viewpoint adaption #681

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

flo2702
Copy link
Collaborator

@flo2702 flo2702 commented Jan 12, 2024

This branch fixes a bug where the initial store contains a field's unadapted type in some cases.

The bug only surfaces when the field's declared type is adapted to a more general type.

For example, consider a partial hierarchy @Top <: @C where for a field of declared type @C Object c, the access this.c has type @Top if this is @Top, and type @C otherwise, as in the following listing.

public class ReceiverAdaption {

    @C Object c;

    void testTop(@Top ReceiverAdaption this) {
        // this.c has the adapted type @Top ◀ @C = @Top, so this should throw an error
        // but the initial store contains the unadapted type @C for c
        @C Object varC = this.c;
    }
}

@flo2702 flo2702 requested a review from wmdietl January 12, 2024 20:25
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.

2 participants