aboutsummaryrefslogtreecommitdiff
path: root/tests/pos-scala2/t5070.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos-scala2/t5070.scala')
-rw-r--r--tests/pos-scala2/t5070.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/pos-scala2/t5070.scala b/tests/pos-scala2/t5070.scala
new file mode 100644
index 000000000..c236b4f9e
--- /dev/null
+++ b/tests/pos-scala2/t5070.scala
@@ -0,0 +1,18 @@
+trait Web {
+ type LocalName
+}
+trait Companion1[A]
+trait WebDSL[W <: Web] {
+ trait LocalNameCompanion extends Companion1[W#LocalName] {
+ type A = String
+ }
+ implicit val LocalName: LocalNameCompanion
+}
+object Test {
+ def t[W <: Web](implicit webDSL: WebDSL[W]): Unit = {
+ import webDSL._
+ implicitly[LocalNameCompanion] // succeeds
+ implicitly[Companion1[W#LocalName]] // fails
+ }
+}
+