package bugIdeas;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import javax.annotation.meta.TypeQualifier;
import javax.annotation.meta.TypeQualifierNickname;
import javax.annotation.meta.When;


public class Ideas_2011_09_24 {
    @Documented
    @TypeQualifier(applicableTo = Integer.class)
    @Retention(RetentionPolicy.RUNTIME)
    public @interface PK {}


@Documented
@TypeQualifier(applicableTo = CharSequence.class)
@Retention(RetentionPolicy.RUNTIME)
public @interface SlashedClassName {

    When when() default When.ALWAYS;
}

@Documented
@SlashedClassName(when = When.NEVER)
@TypeQualifierNickname
@Retention(RetentionPolicy.RUNTIME)
public @interface DottedClassName {
}
    
    public boolean badCheck(@SlashedClassName String slashedClassName, @DottedClassName String dottedClassName) {
        return slashedClassName.equals(dottedClassName);
    }
    
    public boolean badCheck2(@SlashedClassName String slashedClassName, @DottedClassName String dottedClassName) {
        return slashedClassName == dottedClassName;
    }
    
    public boolean badCheck(@PK int x) {
        return x == 5;

    }
    public boolean badCheck2(@PK int x) {
        return x > 5;
    }

}

Add test case for comparison of values with incompatible type qualifiers
Add test case for comparison of values with incompatible type qualifiers


git-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@13892 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3
