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

compiler crashes when it encounters try/catch statement in instance initializer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.3
    • tools
    • sparc
    • solaris_2.5.1



      Name: diC59631 Date: 11/24/97


      class Test { { try {} catch (Throwable t) {} } }
       
      /* "javac Test.java" produces: (JDK version 113)

      sun.tools.java.CompilerError: copyInline
              at sun.tools.tree.TryStatement.copyInline(TryStatement.java)
              at sun.tools.tree.CompoundStatement.copyInline(CompoundStatement.java)
              at sun.tools.tree.InlineMethodExpression.copyInline(InlineMethodExpression.java)
              at sun.tools.tree.MethodExpression.makeVarInits(MethodExpression.java)
              at sun.tools.tree.MethodExpression.checkValue(MethodExpression.java)
              at sun.tools.tree.MethodExpression.check(MethodExpression.java)
              at sun.tools.tree.ExpressionStatement.check(ExpressionStatement.java)
              at sun.tools.tree.Statement.checkBlockStatement(Statement.java)
              at sun.tools.tree.CompoundStatement.check(CompoundStatement.java)
              at sun.tools.tree.Statement.checkMethod(Statement.java)
              at sun.tools.javac.SourceField.check(SourceField.java)
              at sun.tools.javac.SourceClass.checkFields(SourceClass.java)
              at sun.tools.javac.SourceClass.checkInternal(SourceClass.java)
              at sun.tools.javac.SourceClass.check(SourceClass.java)
              at sun.tools.javac.Main.compile(Main.java)
              at sun.tools.javac.Main.main(Main.java)
      error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
      1 error

      */
      (Review ID: 20848)
      ======================================================================

            tturnidgsunw Todd Turnidge (Inactive)
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: