diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-08-21 14:12:23 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-08-21 14:12:23 +0200 |
commit | 6c7d972da57179f5050432233a31f05d4c2c6691 (patch) | |
tree | e3bc6096b5da99df3ca8788625cc4c022b1f3ebe /tests | |
parent | 908603be8dc754a7b391ee0c01c37e868072847b (diff) | |
download | dotty-6c7d972da57179f5050432233a31f05d4c2c6691.tar.gz dotty-6c7d972da57179f5050432233a31f05d4c2c6691.tar.bz2 dotty-6c7d972da57179f5050432233a31f05d4c2c6691.zip |
Test that fields are correctly set before super constructor is called.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/i763.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run/i763.scala b/tests/run/i763.scala new file mode 100644 index 000000000..e60b9cbc0 --- /dev/null +++ b/tests/run/i763.scala @@ -0,0 +1,12 @@ +abstract class A { + val s: Int + assert(s == 1) +} + +class B(val s: Int) extends A + +object Test extends B(1) { + def main(args: Array[String]): Unit = { + s + } +} |