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
I found a crash bug in the compiler & REPL related to type aliases of wild-carded types. Compiling or running the following in the REPL, version 2.11.5, will produce a compiler crash:
There are several conditions for this crash: the type C must be parameterized, the alias must use a wildcard (C[_]), and finally, the call must use a type alias (just calling f[C[_]] works fine).
Here's a fix: scala/scala#6380 - submitted to check how it does on the test suite.
@adriaanm / @retronym does that look viable? What I see in the debugger:
tp is A.T, the type alias. So in the first call to mot, tp0 is A.T
tp1 = tp0.dealias is an ExistentialType, so mot called recursively with tp0 = tp1.skolemizeExistential.
The reason I picked tp.dealias in my patch is simply because it makes the example work, because the cast is inserted (like when the direct type A[_] is used instead of the alias). It's not that I understand the code very well :)
I found a crash bug in the compiler & REPL related to type aliases of wild-carded types. Compiling or running the following in the REPL, version 2.11.5, will produce a compiler crash:
There are several conditions for this crash: the type C must be parameterized, the alias must use a wildcard (
C[_]
), and finally, the call must use a type alias (just callingf[C[_]]
works fine).For reference, I have also created the following stack overflow regarding the issue: http://stackoverflow.com/questions/28510867/scala-2-11-5-compiler-crash-with-type-aliases-and-manifests
The text was updated successfully, but these errors were encountered: