diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-10-12 12:31:30 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-10-12 12:31:30 +0000 |
commit | b33c2c37a4c6b76136b68f754516fbb78481599b (patch) | |
tree | cf7cf65fa5d0a0b0d26f7b612dcba932dafaa585 /test/files | |
parent | 46069e07253cde9668a88683731666bdf7326e42 (diff) | |
download | scala-b33c2c37a4c6b76136b68f754516fbb78481599b.tar.gz scala-b33c2c37a4c6b76136b68f754516fbb78481599b.tar.bz2 scala-b33c2c37a4c6b76136b68f754516fbb78481599b.zip |
Fixes #3895.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t3895.check | 2 | ||||
-rw-r--r-- | test/files/run/t3895.flags | 1 | ||||
-rw-r--r-- | test/files/run/t3895.scala | 30 |
3 files changed, 33 insertions, 0 deletions
diff --git a/test/files/run/t3895.check b/test/files/run/t3895.check new file mode 100644 index 0000000000..3045ebf016 --- /dev/null +++ b/test/files/run/t3895.check @@ -0,0 +1,2 @@ +17 +17
\ No newline at end of file diff --git a/test/files/run/t3895.flags b/test/files/run/t3895.flags new file mode 100644 index 0000000000..ae08446055 --- /dev/null +++ b/test/files/run/t3895.flags @@ -0,0 +1 @@ +-Xcheckinit
\ No newline at end of file diff --git a/test/files/run/t3895.scala b/test/files/run/t3895.scala new file mode 100644 index 0000000000..dfc4a34a32 --- /dev/null +++ b/test/files/run/t3895.scala @@ -0,0 +1,30 @@ +class C extends A{ + + val a = 10 + //object bb + lazy val bb = 17 + val b = 12 +} + +abstract class A{ + val a: Int + val b: Int + val c: Int = 12 +} + +class B extends A{ + + val a = 10 + //object bb + lazy val bb = 17 + val b = 12 +} + + +object Test { + def main(args: Array[String]) { + println(new B().bb) + println(new C().bb) + } +} + |