Fixed
Status Update
Comments
uc...@google.com <uc...@google.com> #2
Reproduced in
Android Studio 3.1 Beta 1
Build #AI-173.4567466, built on January 25, 2018
JRE: 1.8.0_152-release-1024-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.9.0-5-amd64
Android Studio 3.1 Beta 1
Build #AI-173.4567466, built on January 25, 2018
JRE: 1.8.0_152-release-1024-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.9.0-5-amd64
tn...@google.com <tn...@google.com> #3
Fixed by Change-Id: I4d2b8ddecaa64b6e42ccfb3a106b627a62d5d069 for 3.2 canary 3. Thanks for the report!
Description
1. Create a String typedef like this, where the typedef refers to a constant field that is annotated with the typedef.
@MyTypeDef
public static final String FOO = "foo"; //$NON-NLS-1$
@StringDef({FOO})
@Retention(RetentionPolicy.SOURCE)
@Documented
public @interface MyTypeDef {
}
2. Run lint
RESULTS
Actual: Lint fails, saying that the assignment of FOO = "foo" must be one of FOO.
Expected: No error.
NOTES
I reproduced this with AGP 3.1-beta1. It does not occur with 3.0.1.
This could be a regression introduced in the changes for