Hi,
While playing around with miniboxing, I’ve encountered an issue. Take this piece of code:
import scala.concurrent.{ExecutionContext, Future}
trait Sample[@miniboxed T] {
def process(elem: T): Future[Unit]
def apply(elem: T)(implicit ec: ExecutionContext): Unit = {
process(elem).onSuccess {
case () => println("Done")
}
}
}
The above fails with a compilation error:
[error] .../Sample.scala:25: [ occured while creating miniboxed method apply_J in trait Sample_J ]
[error] type mismatch;
[error] found : x1.type (with underlying type Unit)
[error] required: A1
[error] process(elem).onSuccess {
[error] ^
[error] one error found
This seems to happen only for partial functions. If i change that onSuccess to onComplete, then it compiles fine.
Is this a bug? Should I file an issue in GitHub?
--
You received this message because you are subscribed to the Google Groups "Scala Miniboxing Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-miniboxi...@googlegroups.com.
To post to this group, send email to scala-mi...@googlegroups.com.
Visit this group at http://groups.google.com/group/scala-miniboxing.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-miniboxing/CAN9KCovYa3w0EEZ620THRGDFhTv%3Dhn75Zk1%3DXfyRGSZA9f3YtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.