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)
======================================================================
- duplicates
-
JDK-4038527 Try-catch in instance initializer causes compiler error.
-
- Closed
-