You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a subclass extends a @HasQualifierParameter class (or implements a @HasQualifierParameter interface), then the subclass must also be marked @HasQualifierParameter.
It is difficult to diagnose the problem when @HasQualifierParameter is forgotten on a subtype.
Therefore, the Checker Framework should check for this condition, and issue a warning.
The text was updated successfully, but these errors were encountered:
@HasQualifierParameter is marked @Inherited, so you shouldn't have to write it on a subtype. Do you have an example where this isn't working. Here's an example that produces errors because MyBuffer has a qualifier parameter:
import org.checkerframework.checker.tainting.qual.Tainted;
import org.checkerframework.framework.qual.HasQualifierParameter;
import org.checkerframework.checker.tainting.qual.Untainted;
class MyBuffer extends Buffer {
public void method1(@Tainted MyBuffer b1, @Untainted MyBuffer b2) {
b1 = b2; // error
}
public void method2(@Tainted Buffer b1, @Untainted Buffer b2) {
b1 = b2; // error
}
}
@HasQualifierParameter(Tainted.class)
public class Buffer {}
The manual says:
It is difficult to diagnose the problem when
@HasQualifierParameter
is forgotten on a subtype.Therefore, the Checker Framework should check for this condition, and issue a warning.
The text was updated successfully, but these errors were encountered: