java: type_use annotation applicability to var type checked (IDEA-248364)

GitOrigin-RevId: 2c3b97c897e0f995137658c3372d1899c7dc39fe
This commit is contained in:
Anna Kozlova
2020-08-17 22:14:26 +02:00
committed by intellij-monorepo-bot
parent e098f0c147
commit 212ef2f70e
4 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.TYPE_USE})
@interface Anno {}
class MyClass {
{
<error descr="'var' type may not be annotated">@Anno</error> var s = "hello";
}
}