mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
Type annotation in wildcard and class reference types; more tests
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Cast to 'int'" "true"
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
@Target({TYPE_USE}) @interface TA { String value() default ""; }
|
||||
|
||||
class C {
|
||||
{
|
||||
Object o = null;
|
||||
@TA("wtf") <caret>int i = (@TA("wtf") int) o;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -8,6 +8,6 @@ import static java.lang.annotation.ElementType.*;
|
||||
class C {
|
||||
{
|
||||
Object o = null;
|
||||
@TA <caret>List<@TA ? extends @TA String> l = (@TA List<? extends @TA String>) o;
|
||||
@TA List<@TA ? extends @TA String> l = (@TA List<@TA ? extends @TA String>) o;
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Cast to 'int'" "true"
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
@Target({TYPE_USE}) @interface TA { String value() default ""; }
|
||||
|
||||
class C {
|
||||
{
|
||||
Object o = null;
|
||||
@TA("wtf") <caret>int i = o;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user