Skip to content

Commit a25163d

Browse files
Merge pull request #6222 from dotty-staging/fix-#6207
Fix #6207: Avoid hardcoded Dotty version
2 parents 8270aed + d398ae4 commit a25163d

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
scalaVersion := sys.props("plugin.scalaVersion")
22

33
libraryDependencies ++= Seq(
4-
"ch.epfl.lamp" % "dotty_0.14" % scalaVersion.value,
5-
"ch.epfl.lamp" % "dotty_0.14" % scalaVersion.value % "test->runtime",
4+
"ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value,
5+
"ch.epfl.lamp" %% "dotty-compiler" % scalaVersion.value % "test->runtime",
66
"com.novocode" % "junit-interface" % "0.11" % "test"
7-
)
7+
)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package hello
2+
3+
import org.junit.Test
4+
5+
// Import Expr and some extension methods
6+
import scala.quoted._
7+
8+
class Tests {
9+
10+
implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make(getClass.getClassLoader)
11+
12+
@Test def test(): Unit = {
13+
import hello.Main._
14+
15+
val square = stagedPower(2)
16+
17+
assert(Math.pow(3, 2) == square(3))
18+
19+
square(3)
20+
square(4)
21+
22+
assert(Math.pow(4, 2) == square(4))
23+
24+
val cube = stagedPower(3)
25+
cube(2)
26+
27+
28+
assert(Math.pow(2, 3) == cube(2))
29+
30+
31+
32+
val toTheFourth = stagedPower(4)
33+
assert(Math.pow(3, 4) == toTheFourth(3))
34+
}
35+
36+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
> run
2+
> test

0 commit comments

Comments
 (0)