Skip to content

Commit

Permalink
Move issue 144 and 155 to inferrable directory
Browse files Browse the repository at this point in the history
Needs this PR is merged, still: https://github.com/opprop/checker-
framework-inference/pull/129
This fix also triggered a bug in annotation-tools:
typetools/annotation-tools#154
  • Loading branch information
topnessman committed Jan 19, 2018
1 parent 05721fb commit fd80a80
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
// https://github.com/typetools/annotation-tools/issues/144
// TODO https://github.com/opprop/checker-framework-inference/issues/109
public class ConstructorInvocationInSubclassConstructor {
@Immutable ConstructorInvocationInSubclassConstructor() {
Object f;

@Immutable ConstructorInvocationInSubclassConstructor(Object f) {
// :: fixable-error: (assignment.type.incompatible)
this.f = f;
}
}

class SubClass extends ConstructorInvocationInSubclassConstructor {
SubClass() {
SubClass(Object p) {
// Handled by PICOInferenceVisito##checkMethodInvocability
// :: fixable-error: (constructor.invocation.invalid)
super();
// :: fixable-error: (subclass.constructor.invalid)
super(p);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
public class FieldAssignCase1 {
@Assignable Object o;
FieldAssignCase1(Object o) {
// :: fixable-error: (illegal.field.write)
this.o = o;
}
}
3 changes: 3 additions & 0 deletions testinput/inference/limited-inferrable-afu/Bound.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package bug;
// See Bug.java
public class Bound {}
8 changes: 8 additions & 0 deletions testinput/inference/limited-inferrable-afu/Bug.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package bug;

// https://github.com/typetools/annotation-tools/issues/154
public class Bug<T extends Bound> {
Bound b;
Bug() {}
}
//../annotation-tools/annotation-file-utilities/scripts/insert-annotations-to-source -v -d . testinput/inference/limited-inferrable-afu/0.jaif testinput/inference/limited-inferrable-afu/Bound.java testinput/inference/limited-inferrable-afu/Bug.java

0 comments on commit fd80a80

Please sign in to comment.