Skip to content

Commit f2018f0

Browse files
authored
Merge pull request #9606 from dotty-staging/update-reference-compiler-2
Update reference compiler
2 parents 188b99c + 60a3d23 commit f2018f0

File tree

9 files changed

+20
-69
lines changed

9 files changed

+20
-69
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,11 +1379,11 @@ object Trees {
13791379
// Ties the knot of the traversal: call `foldOver(x, tree))` to dive in the `tree` node.
13801380
def apply(x: X, tree: Tree)(using Context): X
13811381

1382-
def apply(x: X, trees: List[Tree])(using Context): X = trees match
1383-
case tree :: rest =>
1384-
apply(apply(x, tree), rest)
1385-
case Nil =>
1386-
x
1382+
def apply(x: X, trees: List[Tree])(using Context): X =
1383+
def fold(x: X, trees: List[Tree]): X = trees match
1384+
case tree :: rest => fold(apply(x, tree), rest)
1385+
case Nil => x
1386+
fold(x, trees)
13871387

13881388
def foldOver(x: X, tree: Tree)(using Context): X =
13891389
if (tree.source != ctx.source && tree.source.exists)

library/src-non-bootstrapped/scala/Enum.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ trait Enum extends Product, Serializable:
55

66
/** A number uniquely identifying a case of an enum */
77
def ordinal: Int
8-
protected def $ordinal: Int

library/src-non-bootstrapped/scala/implicits/Not.scala

Lines changed: 0 additions & 45 deletions
This file was deleted.

library/src-non-bootstrapped/scala/internal/quoted/CompileTime.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@ object CompileTime {
1515
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.exprNestedSplice`")
1616
def exprNestedSplice[T](ctx: QuoteContext)(x: ctx.Nested ?=> Expr[T]): T = ???
1717

18-
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.typeQuote`")
19-
def typeQuote[T <: AnyKind]: Type[T] = ???
20-
21-
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternHole`")
22-
def patternHole[T]: T = ???
23-
24-
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternBindHole`")
25-
class patternBindHole extends Annotation
26-
27-
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternType`")
28-
class patternType extends Annotation
29-
30-
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.fromAbove`")
31-
class fromAbove extends Annotation
32-
3318
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.quoteTypeTag`")
3419
class quoteTypeTag extends Annotation
3520

library/src-non-bootstrapped/scala/internal/quoted/Expr.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ object Expr {
3333
hasTypeSplices: Boolean, qctx: QuoteContext): Option[Tup] =
3434
throw new Exception("Non bootstrapped lib")
3535

36+
def `null`: QuoteContext ?=> quoted.Expr[Null] =
37+
throw new Exception("Non bootstrapped lib")
38+
39+
def Unit: QuoteContext ?=> quoted.Expr[Unit] =
40+
throw new Exception("Non bootstrapped lib")
41+
3642
}
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package scala.quoted
22

3-
abstract class Type[T <: AnyKind] private[scala]:
4-
type `$splice` = T
3+
import scala.annotation.compileTimeOnly
4+
5+
abstract class Type[X <: AnyKind] private[scala]:
6+
type T = X
57
def unseal(using qctx: QuoteContext): qctx.tasty.TypeTree
8+
9+
object Type:
10+
@compileTimeOnly("Reference to `scala.quoted.Type.apply` was not handled by ReifyQuotes")
11+
given apply[T <: AnyKind] as (QuoteContext ?=> Type[T]) = ???

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ object MyScalaJSPlugin extends AutoPlugin {
6262
}
6363

6464
object Build {
65-
val referenceVersion = "0.26.0-RC1"
65+
val referenceVersion = "0.27.0-bin-20200819-6e6f67b-NIGHTLY"
6666

6767
val baseVersion = "0.27.0"
6868
val baseSbtDottyVersion = "0.4.2"

0 commit comments

Comments
 (0)