Skip to content

Commit 04977b7

Browse files
committed
Address review feedback
- Add requisite boilerplate for test cleanup to IndyLambdaTest - ... and to the spot where I copy/pasted the wrong code from - Fix comment.
1 parent cca13ad commit 04977b7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ object IndyLambdaTest extends ClearAfterClass.Clearable {
1818
}
1919
}
2020

21-
class IndyLambdaTest {
21+
class IndyLambdaTest extends ClearAfterClass {
22+
ClearAfterClass.stateToClear = IndyLambdaTest
2223
val compiler = IndyLambdaTest.compiler
2324

2425
@Test def boxingBridgeMethodUsedSelectively(): Unit = {
@@ -35,7 +36,7 @@ class IndyLambdaTest {
3536
// This is because Scala's unboxing of null values gives zero, whereas Java's throw a NPE.
3637

3738
// 1. Here we show that we are calling the boxing bridge (the lambda bodies here are compiled into
38-
// methods of `(I)java/lang/Object;` / `(I)java/lang/Object;` respectively.)
39+
// methods of `(I)Ljava/lang/Object;` / `(I)Ljava/lang/Object;` respectively.)
3940
assertEquals("(Ljava/lang/Object;)Ljava/lang/Object;", implMethodDescriptorFor("(x: Int) => new Object"))
4041
assertEquals("(Ljava/lang/Object;)Ljava/lang/Object;", implMethodDescriptorFor("(x: Object) => 0"))
4142

test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ object InlineInfoTest extends ClearAfterClass.Clearable {
2727
}
2828

2929
@RunWith(classOf[JUnit4])
30-
class InlineInfoTest {
30+
class InlineInfoTest extends ClearAfterClass {
31+
ClearAfterClass.stateToClear = InlineInfoTest
32+
3133
val compiler = InlineInfoTest.compiler
3234

3335
def compile(code: String) = {

0 commit comments

Comments
 (0)