miniboxing-plugin icon indicating copy to clipboard operation
miniboxing-plugin copied to clipboard

Crash on specialization interop

Open VladUreche opened this issue 8 years ago • 0 comments

Taken from https://github.com/scala/scala-dev/issues/250, if everything is miniboxed it works:

trait SpecFun[@miniboxed T] {
  type Res
  def res: Res
}

object Test {
  // the symbols for the `op` argument get out of synch
  def m[@miniboxed T](op: SpecFun[T]): op.Res = op.res
}

but if it's half-miniboxed:

trait SpecFun[@miniboxed T] {
  type Res
  def res: Res
}

object Test {
  // the symbols for the `op` argument get out of synch
  def m[@specialized T](op: SpecFun[T]): op.Res = op.res
}

it crashes.

VladUreche avatar Oct 26 '16 18:10 VladUreche