summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-10-12 12:31:30 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-10-12 12:31:30 +0000
commitb33c2c37a4c6b76136b68f754516fbb78481599b (patch)
treecf7cf65fa5d0a0b0d26f7b612dcba932dafaa585 /test
parent46069e07253cde9668a88683731666bdf7326e42 (diff)
downloadscala-b33c2c37a4c6b76136b68f754516fbb78481599b.tar.gz
scala-b33c2c37a4c6b76136b68f754516fbb78481599b.tar.bz2
scala-b33c2c37a4c6b76136b68f754516fbb78481599b.zip
Fixes #3895.
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t3895.check2
-rw-r--r--test/files/run/t3895.flags1
-rw-r--r--test/files/run/t3895.scala30
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)
+ }
+}
+