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
Parameterizing varargs method on singleton type crashes scalac #3494
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3494?orig=1 |
@paulp said: scala> def f[T](xs: T*) = ()
f: [T](xs: T*)Unit
scala> val x = "abc"
x: java.lang.String = abc
scala> f[x.type](x)
exception when traversing line0$$object.$$iw.$$iw.f[$$iw.$$iw.x.type](line2$$object.$$iw.$$iw.x)
... |
@dragos said: |
@adriaanm said: |
@paulp said:
Or, winding back toward my little side project, I am desperate for some workable mechanism to cause the singleton type to be inferred for specific values (i.e. they will be declared as having the singleton type.) So in case there is some resolution where instead of assuming "singleton type won't be inferred since it never is, so how shall we work around that" we instead said "hey wait a minute, what if allowed ourselves the thrill of inferring the singleton type from time to time..." |
@adriaanm said: |
@paulp said:
Ha ha, that is precisely the invitation I have already accepted, and now I'm seeing what I can do to change the answer. |
Snipping the original report, replacing with essence. Not sure if this usage seems pathological or not, but I have a very interesting side project underway which is temporarily stymied by this crash, so it's of interest at least to me and the original reporter. I'm pretty sure it's related to varargs processing based on the appearance of Array in the crasher and also the last demo below:
The text was updated successfully, but these errors were encountered: