aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/sepComp/A_1.scala13
-rw-r--r--tests/pos/sepComp/B_2.scala13
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/pos/sepComp/A_1.scala b/tests/pos/sepComp/A_1.scala
new file mode 100644
index 000000000..03d574705
--- /dev/null
+++ b/tests/pos/sepComp/A_1.scala
@@ -0,0 +1,13 @@
+package sepComp
+
+class A(y: Int) {
+
+ val x: Int = y
+
+}
+
+object A {
+
+ def apply(x: Int) = new A(22)
+
+}
diff --git a/tests/pos/sepComp/B_2.scala b/tests/pos/sepComp/B_2.scala
new file mode 100644
index 000000000..3a503b352
--- /dev/null
+++ b/tests/pos/sepComp/B_2.scala
@@ -0,0 +1,13 @@
+package sepComp
+
+class B extends A(22) {
+
+ val y: Int = this.x
+
+ val a = A(33)
+
+ println(a.x)
+
+}
+
+