Skip to content

Fix #6207: Avoid hardcoded Dotty version #6222

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

Merged
merged 3 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sbt-dotty/sbt-test/sbt-dotty/quoted-example-project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
scalaVersion := sys.props("plugin.scalaVersion")

libraryDependencies ++= Seq(
"ch.epfl.lamp" % "dotty_0.14" % scalaVersion.value,
"ch.epfl.lamp" % "dotty_0.14" % scalaVersion.value % "test->runtime",
"ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value,
"ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value % "test->runtime",
"com.novocode" % "junit-interface" % "0.11" % "test"
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package hello

import org.junit.Test

// Import Expr and some extension methods
import scala.quoted._

class Tests {

implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make(getClass.getClassLoader)

@Test def test(): Unit = {
import hello.Main._

val square = stagedPower(2)

assert(Math.pow(3, 2) == square(3))

square(3)
square(4)

assert(Math.pow(4, 2) == square(4))

val cube = stagedPower(3)
cube(2)


assert(Math.pow(2, 3) == cube(2))



val toTheFourth = stagedPower(4)
assert(Math.pow(3, 4) == toTheFourth(3))
}

}
1 change: 1 addition & 0 deletions sbt-dotty/sbt-test/sbt-dotty/quoted-example-project/test
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
> run
> test