Skip to content
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

zipWithIndex doesn't work in reify #9933

Closed
scabug opened this issue Sep 22, 2016 · 1 comment
Closed

zipWithIndex doesn't work in reify #9933

scabug opened this issue Sep 22, 2016 · 1 comment

Comments

@scabug
Copy link

scabug commented Sep 22, 2016

import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox

object HelloWorld {
  def main(args: Array[String]) {
    val tb = runtimeMirror(getClass.getClassLoader).mkToolBox()
    val act = tb.typecheck(reify {
      //implicit val imp = Seq.canBuildFrom[(Int, Int)] // Also works if we uncomment this
      Seq(1).zipWithIndex
    }.tree)
  }
}

The typecheck fails, but if the same code is not in a reify, then it works.

@scabug
Copy link
Author

scabug commented Sep 22, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9933?orig=1
Reporter: Gabor Gevay (ggevay)
Affected Versions: 2.11.8, 2.12.0-RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants