Scala Programming Language
  1. Scala Programming Language
  2. SI-5943

toolboxes don't auto-import Predef and scala

    Details

      Description

      scala> val tb = m.mkToolBox() 
      tb: scala.tools.reflect.ToolBox[reflect.runtime.universe.type] = 
      scala.tools.reflect.ToolBoxFactory$ToolBoxImpl@5849e989 
      
      scala> val expr = tb.parseExpr("1 to 3 map (_+1)") 
      expr: tb.u.Tree = 1.to(3).map(((x$1) => x$1.$plus(1))) 
      
      scala> tb.typeCheck(expr) 
      scala.tools.reflect.ToolBoxError: reflective typecheck has failed: value 
      to is not a member of Int at 
       scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal$$anonfun$typeCheckExpr$1.apply(ToolBoxFactory.scala:145) 
      <more stack-trace>
      

        Activity

        Show
        Eugene Burmako added a comment - http://groups.google.com/group/scala-user/browse_thread/thread/88e89d154e79826d
        Show
        Eugene Burmako added a comment - https://github.com/scala/scala/pull/1331
        Show
        Grzegorz Kossakowski added a comment - Fixed in https://github.com/scala/scala/pull/1331

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development