Skip to content

Commit 95d3b43

Browse files
committed
Make the test a run test
1 parent db4872c commit 95d3b43

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

tests/pos/i4754.scala

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/run/i4754.check

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Side effect
2+
Side effect
3+
12

tests/run/i4754.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
object Foo {
2+
private final val x = 1
3+
private def y = 2
4+
private def z: 3 = { println("Side effect"); 3 }
5+
}
6+
7+
class Foo {
8+
import Foo._
9+
inline def foo = x + Foo.x + y + Foo.y + z + Foo.z
10+
}
11+
12+
object Test {
13+
def main(args: Array[String]): Unit = {
14+
println((new Foo).foo)
15+
}
16+
}

0 commit comments

Comments
 (0)