mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
8078024: javac, several incorporation steps are silently failing when an error should be reported
Reviewed-by: mcimadamore
This commit is contained in:
parent
b3ddbe8cf4
commit
8c8261cbad
46 changed files with 243 additions and 88 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -21,23 +21,19 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
// key: compiler.misc.where.intersection
|
||||
// key: compiler.misc.where.description.intersection
|
||||
// key: compiler.misc.intersection.type
|
||||
// key: compiler.err.prob.found.req
|
||||
// key: compiler.misc.inferred.do.not.conform.to.upper.bounds
|
||||
// key: compiler.misc.intersection.type
|
||||
// key: compiler.misc.where.description.intersection.1
|
||||
// key: compiler.misc.where.intersection
|
||||
// key: compiler.err.prob.found.req
|
||||
// options: -XDdiags=where
|
||||
// run: simple
|
||||
|
||||
class WhereIntersection {
|
||||
interface I1 {}
|
||||
interface I2 {}
|
||||
class A implements I1, I2 {}
|
||||
class B implements I1, I2 {}
|
||||
class Test {
|
||||
<Z> Z m(Z z1, Z z2) { return null; }
|
||||
void main(){
|
||||
A a = m(new A(), new B());
|
||||
}
|
||||
static <T> T f(T a, T b) {
|
||||
return a;
|
||||
}
|
||||
static Object[] main(int a, float b) {
|
||||
return f(a, b);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue