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

Correct treatment of T extends Object and ? extends Object in stub files #5684

Closed
wants to merge 17 commits into from

Conversation

smillst
Copy link
Member

@smillst smillst commented Feb 28, 2023

Merge after #5688

When T extends Object or ? extends Object appear in stub files they should be treated the same as if they were written in source code. To implement this, this pull request adds code to store whether extends Object was written in a stub file. Then the defaulting code uses this information.

One complication of this is adding an explicit bound changes the defaulting for all type systems. That's why the type check test is failing. So, I'm not sure how we want to handle this.

Fixes #3030 and fixes #3236.

# Conflicts:
#	framework/src/main/java/org/checkerframework/framework/util/defaults/QualifierDefaults.java
# Conflicts:
#	framework/src/main/java/org/checkerframework/common/basetype/BaseTypeValidator.java
#	framework/src/main/java/org/checkerframework/framework/type/typeannotator/PropagationTypeAnnotator.java
#	framework/src/main/java/org/checkerframework/framework/util/AnnotatedTypes.java
#	framework/src/main/java/org/checkerframework/framework/util/defaults/QualifierDefaults.java
@smillst
Copy link
Member Author

smillst commented Mar 8, 2023

We are going to do this differently.

@smillst smillst closed this Mar 8, 2023
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