You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test.scala:18: error: type mismatch;
found : this.XX with XPrint[B]
required: X[B]
def apply(xv: X[A]): X[C] = f(new XX(xv) with XPrint[B])
^
one error found
I thought a variance issue might be to blame, but changing A to be covariant gives another interesting error:
Test.scala:18: error: illegal inheritance;
anonymous class $anon inherits different type instances of trait X:
X[B] and X[C]
def apply(xv: X[A]): X[C] = f(new XX(xv) with XPrint[B])
^
one error found
This is similar to the error I encountered in the original, non-minimized case. In the original case, however, the type parameters were invariant throughout; also, there is a related crasher that I've been unable to reproduce in a minimized case; in the crash, I get the following error, which provides no indication of the original source of the error:
[info] Compiling 2 Scala sources to /home/workspace/kjn-storage/platform/yggdrasil/target/scala-2.9.1/classes...
[error] {file:/home/workspace/kjn-storage/platform/}yggdrasil/compile:compile: scala.tools.nsc.symtab.Types$TypeError: type mismatch;
[error] found : com.precog.yggdrasil.Column[Boolean]
[error] required: com.precog.yggdrasil.Column[A]
[error] Total time: 3 s, completed Apr 19, 2012 10:01:17 PM
In that original error case, the XX class was declared inside of the anonymous F; in the minimized case, moving the XX class inside of the anonymous F eliminates the two errors first noted.
The text was updated successfully, but these errors were encountered:
Since you're inside an anonymous F, that new XX is in the F[A, C] being created. You want "new outer.XX(sv)" at which point it compiles as given (with or without variance.)
This fails to compile with the following error:
I thought a variance issue might be to blame, but changing A to be covariant gives another interesting error:
gives the following:
This is similar to the error I encountered in the original, non-minimized case. In the original case, however, the type parameters were invariant throughout; also, there is a related crasher that I've been unable to reproduce in a minimized case; in the crash, I get the following error, which provides no indication of the original source of the error:
In that original error case, the XX class was declared inside of the anonymous F; in the minimized case, moving the XX class inside of the anonymous F eliminates the two errors first noted.
The text was updated successfully, but these errors were encountered: