aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-12-10 14:46:04 +0100
committerGitHub <noreply@github.com>2016-12-10 14:46:04 +0100
commit4daf543cf6857295807a8a9d37890891274255a9 (patch)
treed2ad97d9af40edfdf17ec9c00910094c206610c9 /tests
parent48309018fc2ab8d38c46408326f739e5652412c7 (diff)
parenta7003bb223fb535f64a3026ff2a5a3e7d3ab7609 (diff)
downloaddotty-4daf543cf6857295807a8a9d37890891274255a9.tar.gz
dotty-4daf543cf6857295807a8a9d37890891274255a9.tar.bz2
dotty-4daf543cf6857295807a8a9d37890891274255a9.zip
Merge pull request #1768 from dotty-staging/fix-#1765
Fix #1765: Context bounds and denotation handling
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i1765.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/pos/i1765.scala b/tests/pos/i1765.scala
new file mode 100644
index 000000000..d79129638
--- /dev/null
+++ b/tests/pos/i1765.scala
@@ -0,0 +1,21 @@
+trait T[X]
+
+trait U[X]
+
+trait TC[M[_]] {
+ def foo[M[_]: TC, A](ma: U[A]) = ()
+ implicit val TCofT: TC[T] = new TC[T] {}
+ implicit def any2T[A](a: A): T[A] = new T[A] {}
+ implicit def any2U[A](a: A): U[A] = new U[A] {}
+ val x = foo[T, Int](1)
+ val y = ()
+}
+
+// Minimized version exhibiting an assertion violation in Denotation#current at phase lambdalift:
+trait TC2 {
+// implicit val TCofT: TC2[T] = new TC2[T] {}
+ val TCofT: Object = {
+ class C extends TC2
+ new Object
+ }
+}