We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f80923 commit b82f7ebCopy full SHA for b82f7eb
tests/run/mixins1/A_1.scala
@@ -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
@@ -0,0 +1,12 @@
+// Intended to be compiled with either 2.11 or 2.12
+class C extends A {
+ x = 4
+ override def f: Int = super.f
+ val z = x + f(x) + y
+object Test extends App {
+ new C().f
12
0 commit comments