summaryrefslogtreecommitdiff
path: root/test/files/pos/trait_fields_dependent_conflict.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/trait_fields_dependent_conflict.scala')
-rw-r--r--test/files/pos/trait_fields_dependent_conflict.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/trait_fields_dependent_conflict.scala b/test/files/pos/trait_fields_dependent_conflict.scala
new file mode 100644
index 0000000000..afb6f4b0c5
--- /dev/null
+++ b/test/files/pos/trait_fields_dependent_conflict.scala
@@ -0,0 +1,20 @@
+// 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
+}
+
+abstract class MConflict extends N {
+ val self: N
+ val n: self.type
+}
+
+class C extends M with N