Skip to content

Commit 3b8a756

Browse files
Merge pull request #8917 from dotty-staging/remove-deprectated-quoted-matching-package
Remove depreciated quoted.matching package
2 parents 5f6837a + b5b0a4e commit 3b8a756

File tree

38 files changed

+22
-128
lines changed

38 files changed

+22
-128
lines changed
Submodule dotty-cps-async updated 36 files

docs/docs/reference/metaprogramming/macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Here’s a compiler that maps an expression given in the interpreted
237237
language to quoted Scala code of type `Expr[Int]`.
238238
The compiler takes an environment that maps variable names to Scala `Expr`s.
239239
```scala
240-
import scala.quoted.{given _, _}
240+
import scala.quoted._
241241

242242
def compile(e: Exp, env: Map[String, Expr[Int]])(using QuoteContext): Expr[Int] = e match {
243243
case Num(n) =>

library/src/scala/quoted/matching/ConstSeq.scala

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

library/src/scala/quoted/matching/ValueSeq.scala

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

library/src/scala/quoted/matching/package.scala

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

library/src/scala/util/FromDigits.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package scala.util
22
import scala.math.{BigInt}
33
import quoted._
4-
import quoted.matching._
54
import internal.Chars.digit2int
65
import annotation.internal.sharable
76

tests/disabled/run/xml-interpolation-3/XmlQuote_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.tasty.Tasty
32
import scala.quoted.autolift
43

54
import scala.language.implicitConversions

tests/neg-macros/i6976.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
| ^^^^^^^^^
55
| Exception occurred while executing macro expansion.
66
| scala.MatchError: Inlined(EmptyTree,List(),Literal(Constant(2))) (of class dotty.tools.dotc.ast.Trees$Inlined)
7-
| at playground.macros$.mcrImpl(Macro_1.scala:12)
7+
| at playground.macros$.mcrImpl(Macro_1.scala:10)
88
|
99
| This location contains code that was inlined from Test_2.scala:5

tests/neg-macros/i6976/Macro_1.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package playground
22

3-
import scala.quoted._, scala.quoted.matching._
4-
import scala.quoted.{given _}
5-
import scala.tasty._
3+
import scala.quoted._
64

75
object macros {
86
inline def mcr(x: => Any) = ${mcrImpl('x)}
97

108
def mcrImpl(body: Expr[Any])(using ctx: QuoteContext) : Expr[Any] = {
11-
import ctx.tasty.{_, given _}
9+
import ctx.tasty._
1210
body.unseal match { case Block(_, _) => '{2} }
1311
}
1412
}

tests/neg/i6762.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import scala.quoted.{_, given _}
1+
import scala.quoted._
22

33
type G[X]
44
case class Foo[T](x: T)

tests/neg/i6997b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package playground
22

3-
import scala.quoted.{_, given _}, scala.quoted.matching._
3+
import scala.quoted._
44

55
inline def mcr(x: => Any): Any = ${mcrImpl('x)}
66

tests/neg/i7048e.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import scala.quoted.{given _, _}
1+
import scala.quoted._
22

33
abstract class Test {
44
type T

tests/neg/i7618.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package macros
22

3-
import scala.quoted.{given _, _}
3+
import scala.quoted._
44

55
enum Exp {
66
case Num(n: Int)

tests/neg/i7618b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package macros
22

3-
import scala.quoted.{given _, _}
3+
import scala.quoted._
44

55
enum Exp {
66
case Num(n: Int)

tests/neg/i7698.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.quoted.matching._
32

43
trait Show[T] {
54
def show(x: T): String

tests/neg/toexproftuple.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._, scala.deriving._
2-
import scala.quoted.{given _}
32

43
inline def mcr: Any = ${mcrImpl}
54
def mcrImpl(using ctx: QuoteContext): Expr[Any] = {

tests/pos-macros/i7011/Macros_1.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import scala.quoted._, scala.quoted.matching._
2-
import scala.quoted.{given _}
1+
import scala.quoted._
32

43
inline def mcr(body: => Any): Unit = ${mcrImpl('body)}
54

tests/pos-macros/treemap-unapply/Macro.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import scala.quoted.{ given _, _ }
1+
import scala.quoted._
22

33
inline def mcr(x: => Unit): Unit = ${mcrImpl('x)}
44
def mcrImpl(x: Expr[Unit])(using ctx: QuoteContext) : Expr[Unit] =

tests/pos/i6997c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package playground
22

3-
import scala.quoted.{_, given _}, scala.quoted.matching._
3+
import scala.quoted._
44

55
inline def mcr(x: => Any): Any = ${mcrImpl('x)}
66

tests/pos/i7048e.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import scala.quoted.{given _, _}
1+
import scala.quoted._
22

33
abstract class Test {
44
type T

tests/pos/i8651b.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ abstract class Coroutine[+T] {
55
object Macros {
66

77
import scala.quoted._
8-
import scala.quoted.matching._
9-
108

119
inline def coroutine[T](inline body: Any): Coroutine[T] = ${ coroutineImpl('{body}) }
1210

tests/pos/quoted-pattern-type.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.tasty.Reflection
32

43
object Lib {
54

tests/pos/scala2-macro-compat-1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object LineNumberMacro2 {
2020
object LineNumberMacro3 {
2121
import scala.quoted._
2222
def thisLineNumberExpr(using qctx: QuoteContext): Expr[Int] = {
23-
import qctx.tasty.{_, given _}
23+
import qctx.tasty._
2424
Expr(rootPosition.startLine + 1)
2525
}
2626
}

tests/pos/toexproftuple.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._, scala.deriving._
2-
import scala.quoted.{given _}
32

43
inline def mcr: Any = ${mcrImpl}
54
def mcrImpl(using ctx: QuoteContext): Expr[Any] = {

tests/run-macros/i6765-b/Macro_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.quoted.{given _}
32

43
inline def foo = ${fooImpl}
54

tests/run-macros/i6765-c/Macro_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.quoted.{given _}
32

43
inline def foo(inline n: Int) = ${fooImpl('n)}
54

tests/run-macros/i6765/Macro_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.quoted.{given _}
32

43
inline def foo = ${fooImpl}
54

tests/run-macros/i7008/macro_1.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import scala.quoted._, scala.quoted.matching._
2-
import scala.quoted.{given _}
3-
import scala.tasty._
1+
import scala.quoted._
42

53
case class Box[T](v: T)
64

tests/run-macros/i7715/Macros_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import scala.quoted.{ given _, _ }
1+
import scala.quoted._
22

33
inline def mcr(e: => Any): Any = ${mcrImpl('e)}
44
def mcrImpl(e: Expr[Any])(using ctx: QuoteContext): Expr[Any] =

tests/run-macros/quote-matching-optimize-2/Macro_1.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import scala.quoted._
22
import scala.quoted.autolift
33

4-
import scala.tasty.Reflection
5-
64
object Macro {
75

86
inline def optimize[T](inline x: T): Any = ${ Macro.impl('x) }

tests/run-macros/quote-matching-optimize-3/Macro_1.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import scala.quoted._
22
import scala.quoted.autolift
33

4-
import scala.tasty.Reflection
5-
64
object Macro {
75

86
inline def optimize[T](inline x: T): Any = ${ Macro.impl('x) }

tests/run-macros/quote-toExprOfSeq/Macro_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.quoted.{given _}
32

43
inline def seq = ${fooImpl}
54

tests/run-macros/tasty-tree-map/quoted_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object Macros {
55
implicit inline def identityMaped[T](x: => T): T = ${ impl('x) }
66

77
def impl[T: Type](x: Expr[T])(using qctx: QuoteContext) : Expr[T] = {
8-
import qctx.tasty.{_, given _}
8+
import qctx.tasty.{_, given _} // FIXME: #8919
99
val identityMap = new TreeMap { }
1010
val transformed = identityMap.transformTerm(x.unseal).seal.cast[T]
1111
transformed

tests/run-staging/i6992/Macro_1.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

2-
import scala.quoted._, scala.quoted.matching._
2+
import scala.quoted._
33
import scala.quoted.staging._
4-
import scala.quoted.{given _}
54

65
given Toolbox = Toolbox.make(getClass.getClassLoader)
76

tests/run-staging/quote-function-applied-to.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import scala.quoted._
2-
import scala.quoted.{given _}
32
import scala.quoted.staging._
43

54
object Test {

0 commit comments

Comments
 (0)