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

Immutable field annotation interact with initialization checker #42

Open
Ao-senXiong opened this issue Mar 5, 2024 · 2 comments
Open

Comments

@Ao-senXiong
Copy link

Despite PICO is not up to date at the moment, I will use issues to make notes for myself and leave a comment section for discussion of desired behaviour.

public class Demo {
   @Immutable Object o1, o2;

    Demo(Object obj1, Object obj2) {
    }
}

I think we are expecting fields not initialized error, but right now there is now errors.

@Ao-senXiong
Copy link
Author

Ao-senXiong commented Mar 5, 2024

Also for static Immutable field,

public class Demo {
   static @Immutable Object o1, o2;

    Demo(Object obj1, Object obj2) {
    }
}

@Ao-senXiong
Copy link
Author

Should add a test case for this in the future.

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

No branches or pull requests

1 participant