typetools / typetools/checker-framework
Package `@DefaultQualifier` overrides class `@DefaultQualifier`
Open
@smillst is already working on this.
Since Sep 28, 2020.
bug
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Sample:
package-info.java
@DefaultQualifier(value = NonNull.class, locations = TypeUseLocation.FIELD)
@DefaultQualifier(value = NonNull.class, locations = TypeUseLocation.PARAMETER)
@DefaultQualifier(value = NonNull.class, locations = TypeUseLocation.RETURN)
package org.apache.calcite.util;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.framework.qual.DefaultQualifier;
import org.checkerframework.framework.qual.TypeUseLocation;
Glossary.java
package org.apache.calcite.util;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.DefaultQualifier;
import org.checkerframework.framework.qual.TypeUseLocation;
@DefaultQualifier(
value = Nullable.class,
locations = TypeUseLocation.ALL
)
public interface Glossary {
Glossary PATTERN = null;
Glossary SQL2003 = null;
}
Error:
core/src/main/java/org/apache/calcite/util/Glossary.java:331: error: [assignment.type.incompatible] incompatible types in assignment.
Glossary PATTERN = null;
^
found : null
required: @Initialized @NonNull Glossary
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.