Skip to content

Commit b82f7eb

Browse files
committed
Add test case
1 parent 8f80923 commit b82f7eb

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/run/mixins1/A_1.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
trait A {
2+
3+
var x = 3
4+
println("hi")
5+
val y = x * x
6+
7+
def f: Int = x + y
8+
9+
def f(z: Int): Int = f + z
10+
11+
}

tests/run/mixins1/C_2.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Intended to be compiled with either 2.11 or 2.12
2+
class C extends A {
3+
x = 4
4+
5+
override def f: Int = super.f
6+
7+
val z = x + f(x) + y
8+
}
9+
10+
object Test extends App {
11+
new C().f
12+
}

0 commit comments

Comments
 (0)