Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232877

[local-methods] Javac crashes during overload resolution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: repo-amber
    • Fix Version/s: repo-amber
    • Component/s: tools
    • Labels:
    • CPU:
      generic
    • OS:
      generic

      Description

      Compiling the following program:

      public class X {
          public static void main(String args []) {
              void foo(String s, Object o) {
              }
              void foo(Object o, String s) {
              }
              
              foo(new Object(), new String());
              foo(new String(), new Object());
              foo(new Object(), new Object());
              foo(new String(), new String());
          }
      }

      results in:
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$InapplicableSymbolsError$MostSpecificMap.put(Resolve.java:4123)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$InapplicableSymbolsError.mapCandidates(Resolve.java:4110)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$InapplicableSymbolsError.bestCandidate(Resolve.java:4166)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$InapplicableSymbolError.access(Resolve.java:4027)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.accessInternal(Resolve.java:2501)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.accessMethod(Resolve.java:2522)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$BasicLookupHelper.access(Resolve.java:3337)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3578)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3558)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.resolveMethod(Resolve.java:2647)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:3662)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2350)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:666)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:2156)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1736)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:666)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:717)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1873)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1522)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:666)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:738)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStats(Attr.java:756)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1317)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1029)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:666)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:738)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1121)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:875)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:666)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:738)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4862)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4753)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4682)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attrib(Attr.java:4627)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1347)

        Attachments

          Activity

            People

            Assignee:
            sadayapalam Srikanth Adayapalam
            Reporter:
            sadayapalam Srikanth Adayapalam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: