Skip to content

Commit 6c7d972

Browse files
committed
Test that fields are correctly set before super constructor is called.
1 parent 908603b commit 6c7d972

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/run/i763.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
abstract class A {
2+
val s: Int
3+
assert(s == 1)
4+
}
5+
6+
class B(val s: Int) extends A
7+
8+
object Test extends B(1) {
9+
def main(args: Array[String]): Unit = {
10+
s
11+
}
12+
}

0 commit comments

Comments
 (0)