aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/moduleSubtyping.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg/moduleSubtyping.scala')
-rw-r--r--tests/neg/moduleSubtyping.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/neg/moduleSubtyping.scala b/tests/neg/moduleSubtyping.scala
new file mode 100644
index 000000000..18e93d5ac
--- /dev/null
+++ b/tests/neg/moduleSubtyping.scala
@@ -0,0 +1,23 @@
+class C {
+
+ object o {
+
+ var a: C.this.o.type = ???
+ var b: this.type = ???
+ a = b // OK
+ b = a // OK
+
+ var c: Test.o.type = ???
+ a = c // error
+ b = c // error
+ c = a // error
+ c = b // error
+ }
+
+}
+
+object Test extends C {
+
+
+
+}