We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import scala.language.higherKinds import scala.reflect.runtime.universe._ type EI[X] = List[X] def fTt[A,E[X]<:EI[X]](a: A)(implicit tt: TypeTag[E[A]]) = a /* 2.10.1 : Nothing inferred * 2.10.4-RC1: Compiler crashes * 2.11.0-M8 : "error: no type parameters for method fTt" */ fTt(1)
I feel Nothing should be inferred. Interestingly, the same has been working with Manifest in any release:
def fMf[A,E[X]<:EI[X]](a: A)(implicit mf: Manifest[E[A]]) = a fMf(1)
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-8237?orig=1 Reporter: Sonnenschein (sonnenschein) Affected Versions: 2.10.4-RC1, 2.11.0-M8 See #7226
Sorry, something went wrong.
@retronym said: Started crashing in 2.10.x as a result of the fix: #7226 / 221f52757aa64d47
Stopped crasshing on master after this merge 3bd897ba0054fd2cfd580c7f87ff6488c9dca4ea (from 2.10.x)
@retronym said: I believe the root problem here stems from us having multiple, distinct AppliedTypeVars over the same HKTypeRef.
Here's an (ugly) patch in which I detect if we try to relate two such instances, and I ignore it.
https://github.com/retronym/scala/compare/ticket;8237?expand=1
After that, we end up lubbing an empty list of constraints and getting the desired Nothing.
Without it, we end up with a cyclic error in type var bounds after we solve and when we try to instantiate.
Maybe they should be uniqued into the same TypeVar.
@adriaanm said (edited on Feb 5, 2014 7:58:17 PM UTC): This sharing of typerefs is intentional (though perhaps not optimal). I'm sure you know, but just in case: https://github.com/scala/scala/blob/master/src/reflect/scala/reflect/internal/Types.scala#L2967
Your patch does not seem at odds, since the sharing is only relevant to applyArgs, not for bounds-tracking.
@retronym said: scala/scala#3484
retronym
No branches or pull requests
I feel Nothing should be inferred. Interestingly, the same has been working with Manifest in any release:
The text was updated successfully, but these errors were encountered: