Skip to content

Commit 4d4d3a9

Browse files
committed
Adjust number of bytecode insn for Lazy Vals test & extend test
1 parent 8c500f0 commit 4d4d3a9

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Diff for: compiler/test/dotty/tools/backend/jvm/DottyBytecodeTests.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ class DottyBytecodeTests extends DottyBytecodeTest {
597597
val clsIn = dir.lookupName("Test.class", directory = false).input
598598
val clsNode = loadClassNode(clsIn)
599599
val method = getMethod(clsNode, "test")
600-
assertEquals(122, instructionsFromMethod(method).size)
600+
assertEquals(123, instructionsFromMethod(method).size)
601601
}
602602
}
603603

Diff for: tests/run/serialization-new.check

+3
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ Calculating a1
228228
1
229229
Calculating a2
230230
2
231+
Calculating a3
232+
3
231233
Calculating a1
232234
1
233235
Calculating a2
234236
2
237+
3

Diff for: tests/run/serialization-new.scala

+6
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,18 @@ class WithTransient extends Serializable {
476476
println("Calculating a2")
477477
2
478478
}
479+
private lazy val a3 = {
480+
println("Calculating a3")
481+
3
482+
}
483+
479484
@transient object B extends Serializable
480485
@transient private object C extends Serializable
481486

482487
def test = {
483488
println(a1)
484489
println(a2)
490+
println(a3)
485491
if (B == null || C == null)
486492
println("Transient nested object failed to serialize properly")
487493
}

0 commit comments

Comments
 (0)