summaryrefslogtreecommitdiff
path: root/test/files/pos/trait_fields_dependent_rebind.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/trait_fields_dependent_rebind.scala')
-rw-r--r--test/files/pos/trait_fields_dependent_rebind.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/trait_fields_dependent_rebind.scala b/test/files/pos/trait_fields_dependent_rebind.scala
new file mode 100644
index 0000000000..e2cf4c43c3
--- /dev/null
+++ b/test/files/pos/trait_fields_dependent_rebind.scala
@@ -0,0 +1,15 @@
+// derived from test/files/pos/S5.scala
+
+// compile with -uniqid to see a hint of the trouble
+trait N {
+ // the symbol for self does not get rebound when synthesizing members in C
+ val self: N = ???
+ val n: self.type = self
+}
+
+abstract class M {
+ val self: N
+ val n: self.type
+}
+
+class C extends M with N