test/langtools/tools/javac/generics/diamond/neg/T8078473.java
author phh
Sat, 30 Nov 2019 14:33:05 -0800
changeset 59330 5b96c12f909d
parent 52377 907fdbbdf584
permissions -rw-r--r--
8234541: C1 emits an empty message when it inlines successfully Summary: Use "inline" as the message when successfull Reviewed-by: thartmann, mdoerr Contributed-by: navy.xliu@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30404
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
     1
/*
34474
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     4
 *
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
52377
907fdbbdf584 8213263: fix legal headers in test/langtools
jjg
parents: 47216
diff changeset
     7
 * published by the Free Software Foundation.
34474
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     8
 *
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    13
 * accompanied this code).
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    14
 *
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    18
 *
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    21
 * questions.
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    22
 */
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    23
/*
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    24
 * @test
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    25
 * @bug 8078473 8078660
30404
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    26
 * @summary  javac diamond finder crashes when used to build java.base module
34474
14deea5f86f1 8078660: Misleading recommendation from diamond finder.
sadayapalam
parents: 30404
diff changeset
    27
 * @compile -Werror T8078473.java -XDrawDiagnostics -XDfind=diamond
30404
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    28
 */
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    29
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    30
class T8078473<P, Q> {
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    31
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    32
    static class C<T, U> {
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    33
        C(T8078473<?, ?> p) {}
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    34
    }
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    35
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    36
    {
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    37
        new C<Q, Q>(this) {};
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    38
        new C<Q, Q>(this);
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    39
    }
952a476681b2 8078473: javac diamond finder crashes when used to build java.base module.
sadayapalam
parents:
diff changeset
    40
}