langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java
author mchung
Wed, 27 May 2015 13:25:18 -0700
changeset 30846 2b3f379840f0
parent 30730 d3ce7619db2c
permissions -rw-r--r--
8074432: Move jdeps and javap to jdk.jdeps module Reviewed-by: jjg, alanb, erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24896
diff changeset
     2
 * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     4
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     8
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    13
 * accompanied this code).
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    14
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    18
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    21
 * questions.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    22
 */
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    23
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    24
import static com.sun.tools.classfile.TypeAnnotation.TargetType.*;
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    25
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    26
/*
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    27
 * @test
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    28
 * @bug 8042451
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    29
 * @summary Test population of reference info for type casts
30846
2b3f379840f0 8074432: Move jdeps and javap to jdk.jdeps module
mchung
parents: 30730
diff changeset
    30
 * @modules jdk.jdeps/com.sun.tools.classfile
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    31
 * @compile -g Driver.java ReferenceInfoUtil.java TypeCasts.java
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    32
 * @run main Driver TypeCasts
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    33
 */
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    34
public class TypeCasts {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    35
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
    36
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
    37
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    38
    public String returnObject() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    39
        return "Object returnObject() { return (@TA String)null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    40
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    41
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    42
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    43
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    44
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    45
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    46
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    47
    @TADescription(annotation = "TC", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    48
            genericLocation = { 0, 0, 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    49
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    50
    public String returnObjectArray() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    51
        return "Object returnObjectArray() { return (@TC String @TA [] @TB [])null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    52
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    53
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    54
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    55
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    56
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    57
            genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    58
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    59
    public String returnObjectGeneric() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    60
        return "Object returnObjectGeneric() { return (@TA List<@TB String>)null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    61
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    62
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
    63
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
    64
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    65
    public String returnPrim() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    66
        return "Object returnPrim() { return (@TA int)0; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    67
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    68
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    69
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    70
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    71
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    72
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    73
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    74
    public String returnPrimArray() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    75
        return "Object returnPrimArray() { return (@TB int @TA [])null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    76
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    77
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
    78
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
    79
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    80
    public String initObject() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    81
        return "void initObject() { Object a =  (@TA String)null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    82
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    83
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    84
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    85
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    86
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    87
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    88
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    89
    public String initObjectArray() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    90
        return "void initObjectArray() { Object a = (@TB String @TA [])null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    91
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    92
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    93
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    94
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    95
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    96
            genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    97
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    98
    public String initObjectGeneric() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    99
        return "void initObjectGeneric() { Object a = (@TA List<@TB String>)null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   100
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   101
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   102
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   103
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   104
    public String initPrim() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   105
        return "void initPrim() { Object a =  (@TA int)0; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   106
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   107
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   108
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   109
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   110
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   111
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   112
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   113
    public String initPrimArray() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   114
        return "void initPrimArray() { Object a = (@TB int @TA [])null; }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   115
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   116
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   117
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   118
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   119
    public String eqtestObject() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   120
        return "void eqtestObject() { if (null == (@TA String)null); }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   121
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   122
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   123
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   124
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   125
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   126
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   127
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   128
    public String eqtestObjectArray() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   129
        return "void eqtestObjectArray() { if (null == (@TB String @TA [])null); }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   130
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   131
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   132
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   133
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   134
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   135
            genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   136
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   137
    public String eqtestObjectGeneric() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   138
        return "void eqtestObjectGeneric() { if (null == (@TA List<@TB String >)null); }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   139
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   140
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   141
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   142
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   143
    // compiler optimizes away compile time constants casts
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   144
    public String eqtestPrim() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   145
        return "void eqtestPrim(int a) { if (0 == (@TA int)a); }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   146
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   147
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   148
    @TADescription(annotation = "TA", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   149
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   150
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   151
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   152
            typeIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   153
    public String eqtestPrimArray() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   154
        return "void eqtestPrimArray() { if (null == (@TB int @TA [])null); }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   155
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   156
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   157
    @TADescription(annotation = "TA", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   158
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   159
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   160
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   161
    @TADescription(annotation = "TC", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   162
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   163
            genericLocation = {3, 0})
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   164
    public String intersection1() {
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   165
        return "void intersection() { Object o = (@TA String & @TB Comparable<@TC String>) null; }";
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   166
    }
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   167
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   168
    @TADescription(annotation = "TA", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   169
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   170
    @TADescription(annotation = "TB", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   171
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   172
    @TADescription(annotation = "TC", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   173
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   174
            genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   175
    @TADescription(annotation = "TD", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   176
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 2)
15718
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   177
    public String intersection2() {
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   178
        return "void intersection() { Object o = (@TA String & @TB Comparable<@TC String> & @TD CharSequence) null; }";
8e54c8e43d38 8008077: update reference impl for type-annotations
jjg
parents: 15557
diff changeset
   179
    }
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   180
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   181
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   182
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   183
    public String returnObjectRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   184
        return "Object returnObject() { return (@RTA @RTA String)null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   185
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   186
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   187
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   188
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   189
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   190
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   191
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   192
    @TADescription(annotation = "RTCs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   193
            genericLocation = { 0, 0, 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   194
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   195
    public String returnObjectArrayRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   196
        return "Object returnObjectArray() { return (@RTC @RTC String @RTA @RTA [] @RTB @RTB [])null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   197
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   198
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   199
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   200
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   201
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   202
            genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   203
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   204
    public String returnObjectGenericRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   205
        return "Object returnObjectGeneric() { return (@RTA @RTA List<@RTB @RTB String>)null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   206
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   207
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   208
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   209
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   210
    public String returnPrimRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   211
        return "Object returnPrim() { return (@RTA @RTA int)0; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   212
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   213
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   214
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   215
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   216
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   217
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   218
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   219
    public String returnPrimArrayRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   220
        return "Object returnPrimArray() { return (@RTB @RTB int @RTA @RTA [])null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   221
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   222
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   223
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   224
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   225
    public String initObjectRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   226
        return "void initObject() { Object a =  (@RTA @RTA String)null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   227
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   228
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   229
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   230
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   231
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   232
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   233
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   234
    public String initObjectArrayRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   235
        return "void initObjectArray() { Object a = (@RTB @RTB String @RTA @RTA [])null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   236
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   237
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   238
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   239
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   240
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   241
            genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   242
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   243
    public String initObjectGenericRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   244
        return "void initObjectGeneric() { Object a = (@RTA @RTA List<@RTB @RTB String>)null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   245
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   246
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   247
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   248
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   249
    public String initPrimRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   250
        return "void initPrim() { Object a =  (@RTA @RTA int)0; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   251
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   252
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   253
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   254
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   255
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   256
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   257
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   258
    public String initPrimArrayRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   259
        return "void initPrimArray() { Object a = (@RTB @RTB int @RTA @RTA [])null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   260
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   261
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   262
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   263
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   264
    public String eqtestObjectRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   265
        return "void eqtestObject() { if (null == (@RTA @RTA String)null); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   266
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   267
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   268
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   269
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   270
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   271
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   272
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   273
    public String eqtestObjectArrayRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   274
        return "void eqtestObjectArray() { if (null == (@RTB @RTB String @RTA @RTA [])null); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   275
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   276
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   277
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   278
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   279
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   280
            genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   281
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   282
    public String eqtestObjectGenericRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   283
        return "void eqtestObjectGeneric() { if (null == (@RTA @RTA List<@RTB @RTB String >)null); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   284
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   285
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   286
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   287
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   288
    // compiler optimizes away compile time constants casts
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   289
    public String eqtestPrimRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   290
        return "void eqtestPrim(int a) { if (0 == (@RTA @RTA int)a); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   291
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   292
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   293
    @TADescription(annotation = "RTAs", type = CAST, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   294
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   295
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   296
            genericLocation = { 0, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   297
            typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   298
    public String eqtestPrimArrayRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   299
        return "void eqtestPrimArray() { if (null == (@RTB @RTB int @RTA @RTA [])null); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   300
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   301
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   302
    @TADescription(annotation = "RTAs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   303
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   304
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   305
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   306
    @TADescription(annotation = "RTCs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   307
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   308
            genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   309
    public String intersectionRepeatableAnnotation1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   310
        return "void intersection() { Object o = (@RTA @RTA String & @RTB @RTB Comparable<@RTC @RTC String>) null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   311
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   312
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   313
    @TADescription(annotation = "RTAs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   314
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   315
    @TADescription(annotation = "RTBs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   316
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   317
    @TADescription(annotation = "RTCs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   318
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   319
            genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   320
    @TADescription(annotation = "RTDs", type = CAST,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   321
            offset = ReferenceInfoUtil.IGNORE_VALUE, typeIndex = 2)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   322
    public String intersectionRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   323
        return "void intersection() { Object o = (@RTA @RTA String & @RTB @RTB Comparable<@RTC @RTC String> &" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   324
                " @RTD @RTD CharSequence) null; }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   325
    }
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   326
}