java: no annotations needed in type cast

This commit is contained in:
Roman Shevchenko
2014-03-06 10:55:44 +01:00
parent 1687a22e89
commit 4969888e1f
4 changed files with 12 additions and 11 deletions
@@ -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;
}
}
@@ -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;
}
}
@@ -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;
}
}