-
Notifications
You must be signed in to change notification settings - Fork 21
regression 2.8 Existential type error: "kinds of the type arguments (?) do not conform to the expected kinds of the type parameters (type A) in trait T. #2308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Imported From: https://issues.scala-lang.org/browse/SI-2308?orig=1 |
@retronym said: existential.scala: trait Request[IN[_]]
trait T[A]
val request: Request[IN] forSome { type IN[_] } = new Request[T] {} ~$$ scala-2.7.5 ~/Desktop/existential.scala
~$$ scala-2.8.0 ~/Desktop/existential.scala
(fragment of existential.scala):3: error: type mismatch;
found : java.lang.Object with this.Request[this.T]{ ... }
required: this.Request[_[_]]
var request: Request[IN] forSome { type IN[_] } = new Request[T] {}
^
one error found
!!!
discarding <script preamble>
~$$ scala-2.8.0 -version
Scala code runner version 2.8.0.r18583-b20090827020153 -- Copyright 2002-2009, LAMP/EPFL
|
@paulp said: % whatbroke 2308
[...]
commit 7d041c9c19a1917ddaaeda894e8fade3c43636b3
Author: moors <moors@5e8d7ff9-d8ef-0310-90f0-a4852d11357a>
Date: Thu Aug 13 08:37:19 2009 +0000
fix for 513: use deep ForeachTypeTraverser in doTypeTraversal instead of shallow one
test case+checkfile for SI-513
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@18473 5e8d7ff9-d8ef-0310-90f0-a4852d11357a So in case you didn't already know, r18473. |
@adriaanm said:
|
@retronym said: For the first problem: trait T[A[_]];
object Bug2308A {
type T1 = T[B] forSome { type B[_] }
} A naive trip through the debugger suggests that:
Perhaps The second problem, which is blocking the port of part of Scalaz, is eluding me. It is minimally: trait Request[IN[_]]
trait T[A]
(null: Request[T]) : (Request[IN] forSome { type IN[_] }) Which part of the type conformance checking should return true for |
@retronym said: scala> trait T[M[_]]
defined trait T
scala> classOf[T[X] forSome{ type X[_] }]
<console>:5: error: kinds of the type arguments (?) do not conform to the expect
ed kinds of the type parameters (type M) in trait T.
?'s type parameters do not match type M's expected parameters: <none> has no typ
e parameters, but type M has one |
works in 2.7.5
The text was updated successfully, but these errors were encountered: