8051402: javac, type containment should accept that CAP <= ? extends CAP and CAP <= ? super CAP

Mon, 21 Jul 2014 10:45:40 -0400

author
vromero
date
Mon, 21 Jul 2014 10:45:40 -0400
changeset 2544
91e9834baff2
parent 2543
c6d5efccedc3
child 2545
64dc6333e6dc
child 2546
06c99ec9d8fb

8051402: javac, type containment should accept that CAP <= ? extends CAP and CAP <= ? super CAP
Reviewed-by: mcimadamore, dlsmith

src/share/classes/com/sun/tools/javac/code/Types.java file | annotate | diff | comparison | revisions
test/tools/javac/lambda/TargetType61.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java	Fri Jun 20 20:36:54 2014 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Mon Jul 21 10:45:40 2014 -0400
     1.3 @@ -1396,6 +1396,7 @@
     1.4                  else {
     1.5  //                    debugContainsType(t, s);
     1.6                      return isSameWildcard(t, s)
     1.7 +                        || t.type == s
     1.8                          || isCaptureOf(s, t)
     1.9                          || ((t.isExtendsBound() || isSubtypeNoCapture(wildLowerBound(t), cvarLowerBound(wildLowerBound(s)))) &&
    1.10                              // TODO: JDK-8039214, cvarUpperBound call here is incorrect
     2.1 --- a/test/tools/javac/lambda/TargetType61.java	Fri Jun 20 20:36:54 2014 +0100
     2.2 +++ b/test/tools/javac/lambda/TargetType61.java	Mon Jul 21 10:45:40 2014 -0400
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -23,7 +23,7 @@
    2.11  
    2.12  /*
    2.13   * @test
    2.14 - * @bug 8007464
    2.15 + * @bug 8007464 8051402
    2.16   * @summary Add graph inference support
    2.17   *          check that new wildcards inference strategy doesn't run into 7190296
    2.18   * @compile TargetType61.java

mercurial