langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java
author vromero
Tue, 08 Jan 2013 13:47:57 +0000
changeset 15040 99fd9483d3f0
parent 11381 890ea587d133
child 15384 5a8d00abf076
permissions -rw-r--r--
8005167: execution time of combo tests in javac should be improved Reviewed-by: jjg, jjh
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     1
/*
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
     2
 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     4
 *
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     7
 * published by the Free Software Foundation.
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     8
 *
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    13
 * accompanied this code).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    14
 *
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    18
 *
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    21
 * questions.
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    22
 */
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    23
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    24
/*
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    25
 * @test
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    26
 * @bug 7062745
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    27
 * @summary  Regression: difference in overload resolution when two methods
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    28
 * are maximally specific
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    29
 * @library ../../../lib
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    30
 * @build JavacTestingAbstractThreadedTest
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    31
 * @run main GenericOverrideTest
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    32
 */
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    33
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    34
import java.net.URI;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    35
import java.util.Arrays;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    36
import javax.tools.Diagnostic;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    37
import javax.tools.JavaFileObject;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    38
import javax.tools.SimpleJavaFileObject;
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    39
import com.sun.source.util.JavacTask;
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    40
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    41
public class GenericOverrideTest
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    42
    extends JavacTestingAbstractThreadedTest
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
    43
    implements Runnable {
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    44
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    45
    enum SignatureKind {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    46
        NON_GENERIC(""),
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    47
        GENERIC("<X>");
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    48
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    49
        String paramStr;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    50
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    51
        private SignatureKind(String paramStr) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    52
            this.paramStr = paramStr;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    53
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    54
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    55
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    56
    enum ReturnTypeKind {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    57
        LIST("List"),
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    58
        ARRAYLIST("ArrayList");
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    59
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    60
        String retStr;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    61
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    62
        private ReturnTypeKind(String retStr) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    63
            this.retStr = retStr;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    64
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    65
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    66
        boolean moreSpecificThan(ReturnTypeKind that) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    67
            switch (this) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    68
                case LIST:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    69
                    return that == this;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    70
                case ARRAYLIST:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    71
                    return that == LIST || that == ARRAYLIST;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    72
                default: throw new AssertionError("Unexpected ret kind: " + this);
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    73
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    74
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    75
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    76
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    77
    enum TypeArgumentKind {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    78
        NONE(""),
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    79
        UNBOUND("<?>"),
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    80
        INTEGER("<Number>"),
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    81
        NUMBER("<Integer>"),
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    82
        TYPEVAR("<X>");
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    83
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    84
        String typeargStr;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    85
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    86
        private TypeArgumentKind(String typeargStr) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    87
            this.typeargStr = typeargStr;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    88
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    89
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    90
        boolean compatibleWith(SignatureKind sig) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    91
            switch (this) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    92
                case TYPEVAR: return sig != SignatureKind.NON_GENERIC;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    93
                default: return true;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    94
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    95
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    96
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    97
        boolean moreSpecificThan(TypeArgumentKind that, boolean strict) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    98
            switch (this) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
    99
                case NONE:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   100
                    return that == this || !strict;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   101
                case UNBOUND:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   102
                    return that == this || that == NONE;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   103
                case INTEGER:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   104
                case NUMBER:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   105
                case TYPEVAR:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   106
                    return that == this || that == NONE || that == UNBOUND;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   107
                default: throw new AssertionError("Unexpected typearg kind: " + this);
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   108
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   109
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   110
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   111
        boolean assignableTo(TypeArgumentKind that, SignatureKind sig) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   112
            switch (this) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   113
                case NONE:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   114
                    //this case needs to workaround to javac's impl of 15.12.2.8 being too strict
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   115
                    //ideally should be just 'return true' (see 7067746)
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   116
                    return sig == SignatureKind.NON_GENERIC || that == NONE;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   117
                case UNBOUND:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   118
                    return that == this || that == NONE;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   119
                case INTEGER:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   120
                case NUMBER:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   121
                    return that == this || that == NONE || that == UNBOUND;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   122
                case TYPEVAR:
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   123
                    return true;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   124
                default: throw new AssertionError("Unexpected typearg kind: " + this);
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   125
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   126
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   127
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   128
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   129
    public static void main(String... args) throws Exception {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   130
        for (SignatureKind sig1 : SignatureKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   131
            for (ReturnTypeKind rt1 : ReturnTypeKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   132
                for (TypeArgumentKind ta1 : TypeArgumentKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   133
                    if (!ta1.compatibleWith(sig1)) continue;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   134
                    for (SignatureKind sig2 : SignatureKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   135
                        for (ReturnTypeKind rt2 : ReturnTypeKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   136
                            for (TypeArgumentKind ta2 : TypeArgumentKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   137
                                if (!ta2.compatibleWith(sig2)) continue;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   138
                                for (ReturnTypeKind rt3 : ReturnTypeKind.values()) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   139
                                    for (TypeArgumentKind ta3 : TypeArgumentKind.values()) {
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   140
                                        if (!ta3.compatibleWith(SignatureKind.NON_GENERIC))
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   141
                                            continue;
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   142
                                        pool.execute(
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   143
                                                new GenericOverrideTest(sig1,
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   144
                                                rt1, ta1, sig2, rt2,
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   145
                                                ta2, rt3, ta3));
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   146
                                    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   147
                                }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   148
                            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   149
                        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   150
                    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   151
                }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   152
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   153
        }
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   154
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   155
        checkAfterExec();
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   156
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   157
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   158
    SignatureKind sig1, sig2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   159
    ReturnTypeKind rt1, rt2, rt3;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   160
    TypeArgumentKind ta1, ta2, ta3;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   161
    JavaSource source;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   162
    DiagnosticChecker diagChecker;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   163
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   164
    GenericOverrideTest(SignatureKind sig1, ReturnTypeKind rt1, TypeArgumentKind ta1,
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   165
            SignatureKind sig2, ReturnTypeKind rt2, TypeArgumentKind ta2,
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   166
            ReturnTypeKind rt3, TypeArgumentKind ta3) {
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   167
        this.sig1 = sig1;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   168
        this.sig2 = sig2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   169
        this.rt1 = rt1;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   170
        this.rt2 = rt2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   171
        this.rt3 = rt3;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   172
        this.ta1 = ta1;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   173
        this.ta2 = ta2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   174
        this.ta3 = ta3;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   175
        this.source = new JavaSource();
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   176
        this.diagChecker = new DiagnosticChecker();
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   177
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   178
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   179
    class JavaSource extends SimpleJavaFileObject {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   180
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   181
        String template = "import java.util.*;\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   182
                          "interface A { #S1 #R1#TA1 m(); }\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   183
                          "interface B { #S2 #R2#TA2 m(); }\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   184
                          "interface AB extends A, B {}\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   185
                          "class Test {\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   186
                          "  void test(AB ab) { #R3#TA3 n = ab.m(); }\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   187
                          "}";
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   188
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   189
        String source;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   190
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   191
        public JavaSource() {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   192
            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   193
            source = template.replace("#S1", sig1.paramStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   194
                    replace("#S2", sig2.paramStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   195
                    replace("#R1", rt1.retStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   196
                    replace("#R2", rt2.retStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   197
                    replace("#R3", rt3.retStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   198
                    replace("#TA1", ta1.typeargStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   199
                    replace("#TA2", ta2.typeargStr).
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   200
                    replace("#TA3", ta3.typeargStr);
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   201
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   202
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   203
        @Override
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   204
        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   205
            return source;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   206
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   207
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   208
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   209
    @Override
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   210
    public void run() {
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   211
        JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), diagChecker,
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   212
                null, null, Arrays.asList(source));
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   213
        try {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   214
            ct.analyze();
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   215
        } catch (Throwable ex) {
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   216
            throw new AssertionError("Error thrown when compiling the following code:\n" +
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   217
                    source.getCharContent(true));
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   218
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   219
        check();
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   220
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   221
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   222
    void check() {
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   223
        checkCount.incrementAndGet();
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   224
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   225
        boolean errorExpected = false;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   226
        int mostSpecific = 0;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   227
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   228
        //first check that either |R1| <: |R2| or |R2| <: |R1|
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   229
        if (rt1 != rt2) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   230
            if (!rt1.moreSpecificThan(rt2) &&
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   231
                    !rt2.moreSpecificThan(rt1)) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   232
                errorExpected = true;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   233
            } else {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   234
                mostSpecific = rt1.moreSpecificThan(rt2) ? 1 : 2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   235
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   236
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   237
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   238
        //check that either TA1 <= TA2 or TA2 <= TA1 (unless most specific return found above is raw)
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   239
        if (!errorExpected) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   240
            if (ta1 != ta2) {
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   241
                boolean useStrictCheck = ta1.moreSpecificThan(ta2, true) ||
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   242
                        ta2.moreSpecificThan(ta1, true);
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   243
                if (!ta1.moreSpecificThan(ta2, useStrictCheck) &&
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   244
                        !ta2.moreSpecificThan(ta1, useStrictCheck)) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   245
                    errorExpected = true;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   246
                } else {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   247
                    int mostSpecific2 = ta1.moreSpecificThan(ta2, useStrictCheck) ? 1 : 2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   248
                    if (mostSpecific != 0 && mostSpecific2 != mostSpecific) {
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   249
                        errorExpected = mostSpecific == 1 ?
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   250
                                ta1 != TypeArgumentKind.NONE :
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   251
                                ta2 != TypeArgumentKind.NONE;
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   252
                    } else {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   253
                        mostSpecific = mostSpecific2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   254
                    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   255
                }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   256
            } else if (mostSpecific == 0) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   257
                //when no signature is better than the other, an arbitrary choice
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   258
                //must be made - javac always picks the second signature
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   259
                mostSpecific = 2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   260
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   261
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   262
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   263
        //finally, check that most specific return type is compatible with expected type
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   264
        if (!errorExpected) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   265
            ReturnTypeKind msrt = mostSpecific == 1 ? rt1 : rt2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   266
            TypeArgumentKind msta = mostSpecific == 1 ? ta1 : ta2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   267
            SignatureKind mssig = mostSpecific == 1 ? sig1 : sig2;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   268
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   269
            if (!msrt.moreSpecificThan(rt3) ||
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   270
                    !msta.assignableTo(ta3, mssig)) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   271
                errorExpected = true;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   272
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   273
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   274
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   275
        if (errorExpected != diagChecker.errorFound) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   276
            throw new Error("invalid diagnostics for source:\n" +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   277
                source.getCharContent(true) +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   278
                "\nFound error: " + diagChecker.errorFound +
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   279
                "\nExpected error: " + errorExpected);
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   280
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   281
    }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   282
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   283
    static class DiagnosticChecker
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   284
        implements javax.tools.DiagnosticListener<JavaFileObject> {
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   285
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   286
        boolean errorFound;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   287
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   288
        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   289
            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   290
                errorFound = true;
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   291
            }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   292
        }
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   293
    }
15040
99fd9483d3f0 8005167: execution time of combo tests in javac should be improved
vromero
parents: 11381
diff changeset
   294
10197
28afe0fb34c8 7062745: Regression: difference in overload resolution when two methods are maximally specific
mcimadamore
parents:
diff changeset
   295
}