mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
constant expressions check: discard polyadic expressions of non-primitive/Strings types (IDEA-104347)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
@interface Foo {
|
||||
String value();
|
||||
}
|
||||
|
||||
@Foo(<error descr="Attribute value must be constant">"myclass: " + Bar.class</error>)
|
||||
class Bar {}
|
||||
|
||||
@Foo("myclass: Bazz")
|
||||
class Bazz{}
|
||||
|
||||
@Foo("myclass:" + "Bazz1")
|
||||
class Bazz1{}
|
||||
|
||||
@Foo(Const.CONST + Const.CONST)
|
||||
class Bazz2{}
|
||||
|
||||
@Foo(<error descr="Incompatible types. Found: 'java.lang.Class<FooBar>', required: 'java.lang.String'">FooBar.class</error>)
|
||||
class FooBar {}
|
||||
|
||||
class Const {
|
||||
public static final String CONST = "const";
|
||||
}
|
||||
Reference in New Issue
Block a user