Upgrade `source-depdencies/macro` test.

Switched to current version of Scala that sbt itself uses in
`source-dependencies/macro` test. Since sbt is on Scala 2.10 now
we can do that.

Adjusted test-case to current API for macros.
This commit is contained in:
Grzegorz Kossakowski 2013-02-22 16:50:56 -08:00 committed by Mark Harrah
parent 3cc0c74862
commit f9940fc430
3 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,8 @@
package macro
import scala.language.experimental.macros
import scala.reflect.macros._
object Provider {
def macro tree(args: Any) = reify(args)
def tree(args: Any) = macro treeImpl
def treeImpl(c: Context)(args: c.Expr[Any]) = c.universe.reify(args.splice)
}

View File

@ -1,5 +1,8 @@
package macro
import scala.language.experimental.macros
import scala.reflect.macros._
object Provider {
def macro tree(args: Any) = sys.error("no macro for you!")
def tree(args: Any) = macro treeImpl
def treeImpl(c: Context)(args: c.Expr[Any]) = sys.error("no macro for you!")
}

View File

@ -3,8 +3,7 @@ import Keys._
object build extends Build {
val defaultSettings = Seq(
scalaVersion := "2.10.0-M2",
scalacOptions += "-Xmacros"
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-reflect" % _ )
)
lazy val root = Project(