Skip to content

Commit 891bcb9

Browse files
Merge pull request #103 from alexarchambault/scala-3.0.0-RC1
Update Scala to 3.0.0-RC1
2 parents 0f81028 + f49baed commit 891bcb9

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
22

33
val dottyVersions = sys.props.get("dottyVersion").toList
44

5-
val scalaVersions = "2.11.12" :: "2.12.13" :: "2.13.4" :: "3.0.0-M3" :: dottyVersions
5+
val scalaVersions = "2.11.12" :: "2.12.13" :: "2.13.4" :: "3.0.0-RC1" :: dottyVersions
66
val scala2Versions = scalaVersions.filter(_.startsWith("2."))
77

88
val scalaJSVersions = for {

mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This is a wrapper script, that automatically download mill from GitHub release pages
44
# You can give the required mill version with MILL_VERSION env variable
55
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
6-
DEFAULT_MILL_VERSION=0.9.4-18-82ea87
6+
DEFAULT_MILL_VERSION=0.9.5
77

88
set -e
99

sourcecode/src-3/sourcecode/Macros.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,14 @@ object Macros {
189189
owner match {
190190
case defSym if defSym.isDefDef =>
191191
defSym.tree.asInstanceOf[DefDef].paramss
192+
// FIXME Could be a List[TypeDef] too, although I'm not
193+
// sure under which conditions this can happen…
194+
.map(_.asInstanceOf[List[ValDef]])
192195
case classSym if classSym.isClassDef =>
193196
classSym.tree.asInstanceOf[ClassDef].constructor.paramss
197+
// FIXME Could be a List[TypeDef] too, although I'm not
198+
// sure under which conditions this can happen…
199+
.map(_.asInstanceOf[List[ValDef]])
194200
case _ =>
195201
nearestEnclosingMethod(owner.owner)
196202
}
@@ -213,7 +219,7 @@ object Macros {
213219

214220
def text[T: Type](v: Expr[T])(using Quotes): Expr[sourcecode.Text[T]] = {
215221
import quotes.reflect._
216-
val txt = Term.of(v).pos.sourceCode.get
222+
val txt = v.asTerm.pos.sourceCode.get
217223
'{sourcecode.Text[T]($v, ${Expr(txt)})}
218224
}
219225

0 commit comments

Comments
 (0)