-
Notifications
You must be signed in to change notification settings - Fork 21
Compiler crash when invoking on tagged Array containing Primitive type #7088
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-7088?orig=1 |
Dave Whittaker (davewhittaker) said: |
@paulp said: |
@paulp said: |
Ben Hutchison (ben_hutchison) said (edited on Jul 2, 2013 4:07:18 PM UTC): (The -optimise flag is required to Scalac). object TaggedArray { private final int[] tagary; |
@paulp said: So enjoy the unboxed view while it lasts! |
@benhutchison said: Welcome to Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_51). |
@lrytz said: |
The following code crashes the compiler:
Sympton:
[error] uncaught exception during compilation: RuntimeException("scala.Array.update : Object, Object, Any") @ scala.sys.
package$.error(package.scala:27)
java.lang.RuntimeException: scala.Array.update : Object, Object, Any
at scala.sys.package$.error(package.scala:27)
at scala.tools.nsc.backend.ScalaPrimitives$$anonfun$elementType$1$1$$anonfun$apply$1.apply(ScalaPrimitives.scala
:571)
at scala.tools.nsc.backend.ScalaPrimitives$$anonfun$elementType$1$1.apply(ScalaPrimitives.scala:571)
at scala.tools.nsc.backend.ScalaPrimitives$$anonfun$elementType$1$1.apply(ScalaPrimitives.scala:567)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:203)
at scala.tools.nsc.backend.ScalaPrimitives.elementType$1(ScalaPrimitives.scala:567)
at scala.tools.nsc.backend.ScalaPrimitives.getPrimitive(ScalaPrimitives.scala:592)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genPrimitiveOp(GenICode.scala:421)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadApply6$1(GenICode.scala:751)
My theory is that the presence of the "with Tag" on the Array type disrupts the usual process of resolving the correct primitive type when generating operations on the Array.
Note this is the (greatly simplified) cause of #6975, which I reported. I will close the other issue now.
The text was updated successfully, but these errors were encountered: