Skip to content

Commit 57ecd84

Browse files
committed
Fix test case tests/run/t9915
1 parent b700b76 commit 57ecd84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ClassfileParser(
9494
}
9595
catch {
9696
case e: RuntimeException =>
97-
e.printStackTrace()
97+
if (ctx.debug) e.printStackTrace()
9898
throw new IOException(
9999
i"""class file ${classfile.canonicalPath} is broken, reading aborted with ${e.getClass}
100100
|${Option(e.getMessage).getOrElse("")}""")
@@ -1155,7 +1155,7 @@ class ClassfileParser(
11551155
val start = starts(index)
11561156
value = (in.getByte(start).toInt: @switch) match {
11571157
case CONSTANT_STRING =>
1158-
Constant(getName(in.getChar(start + 1).toInt).toString)
1158+
Constant(getName(in.getChar(start + 1).toInt).value)
11591159
case CONSTANT_INTEGER =>
11601160
Constant(in.getInt(start + 1))
11611161
case CONSTANT_FLOAT =>

0 commit comments

Comments
 (0)