diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-03 14:04:26 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-03-03 14:09:05 +0100 |
commit | c7f1f35c36593ac9454c8572a59c649610829b6a (patch) | |
tree | b2de4b3cff10739cb9685b62b2b41a95961f7100 | |
parent | 10d868ce335d1ecbb0a6acb8d4bd804d76edcac9 (diff) | |
download | dotty-c7f1f35c36593ac9454c8572a59c649610829b6a.tar.gz dotty-c7f1f35c36593ac9454c8572a59c649610829b6a.tar.bz2 dotty-c7f1f35c36593ac9454c8572a59c649610829b6a.zip |
Adress reviewers comments
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/TypeComparer.scala | 2 | ||||
-rw-r--r-- | tests/pending/pos/depmet_implicit_oopsla_session_2.scala | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index 168742257..e423dd686 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -1331,7 +1331,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling { } if (homogenizeArgs && isNonvariantAlias(rinfo1) && isNonvariantAlias(rinfo2)) - isSameType(rinfo1, rinfo2) + isSameType(rinfo1, rinfo2) // establish new constraint tp1.derivedRefinedType(parent, tp1.refinedName, rinfo1 & rinfo2) case _ => diff --git a/tests/pending/pos/depmet_implicit_oopsla_session_2.scala b/tests/pending/pos/depmet_implicit_oopsla_session_2.scala index fcf18691a..26fa2a4cc 100644 --- a/tests/pending/pos/depmet_implicit_oopsla_session_2.scala +++ b/tests/pending/pos/depmet_implicit_oopsla_session_2.scala @@ -1,4 +1,10 @@ +// Fails on line 70 with: no implicit argument of type Sessions.Session[ +// | Sessions.In[Int, Sessions.In[Int, Sessions.Out[Int, Sessions.Stop]]]^ +// |]#HasDual[Sessions.Out[Int, Sessions.Out[Int, Sessions.In[Int, Sessions.Stop]]]^ +// | ] found for parameter evidence$1 of method runSession in object Sessions +// This could be related to existential types (the # essentially boils down to one). object Sessions { + def ?[T <: AnyRef](implicit w: T): w.type = w // session states sealed case class Stop() @@ -17,7 +23,7 @@ object Sessions { // friendly interface to the theory def runSession[S, D: Session[S]#HasDual](session: S, dual: D) = - implicitly[Session[S]#HasDual[D]].run(session, dual) + ?[Session[S]#HasDual[D]].run(session, dual) // facts in the theory: |