summaryrefslogtreecommitdiff
path: root/test/files/pos/t6161b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t6161b.scala')
-rw-r--r--test/files/pos/t6161b.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/pos/t6161b.scala b/test/files/pos/t6161b.scala
new file mode 100644
index 0000000000..5783cc85f2
--- /dev/null
+++ b/test/files/pos/t6161b.scala
@@ -0,0 +1,22 @@
+object t6161 {
+ trait N {
+ type Name
+ }
+
+ trait N1 extends N {
+ class Name {
+ type ThisNameType <: Name
+ def encode: ThisNameType = ???
+ }
+ }
+
+ trait S {
+ self: N => // change to N1 and it compiles
+ type NameType <: Name
+ }
+
+ object g extends S with N1
+
+ val n1: g.NameType = ???
+ val n2: g.Name = n1.encode
+}