mirror of https://github.com/sbt/sbt.git
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:
parent
3cc0c74862
commit
f9940fc430
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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!")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue