mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
java: no annotations needed in type cast
This commit is contained in:
+1
-1
@@ -7,6 +7,6 @@ import static java.lang.annotation.ElementType.*;
|
||||
class C {
|
||||
{
|
||||
Object o = null;
|
||||
@TA int @TA [] a = (@TA int @TA[]) o;
|
||||
@TA int @TA [] a = (int[]) o;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
// "Cast to 'java.lang.Integer'" "true"
|
||||
// "Cast to 'java.util.List<java.lang.Integer>'" "true"
|
||||
import java.lang.annotation.*;
|
||||
import java.util.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
@Target({TYPE_USE}) @interface TA { }
|
||||
@@ -7,6 +8,6 @@ import static java.lang.annotation.ElementType.*;
|
||||
class C {
|
||||
{
|
||||
Object o = null;
|
||||
@TA <caret>Integer i = (@TA Integer) o;
|
||||
@TA List<@TA Integer> i = (List<Integer>) o;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
// "Cast to 'java.lang.Integer'" "true"
|
||||
// "Cast to 'java.util.List<java.lang.Integer>'" "true"
|
||||
import java.lang.annotation.*;
|
||||
import java.util.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
@Target({TYPE_USE}) @interface TA { }
|
||||
@@ -7,6 +8,6 @@ import static java.lang.annotation.ElementType.*;
|
||||
class C {
|
||||
{
|
||||
Object o = null;
|
||||
@TA <caret>Integer i = o;
|
||||
@TA <caret>List<@TA Integer> i = o;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user