Skip to content

Commit 4ad3ffb

Browse files
Merge pull request #10105 from dotty-staging/use-canonical-quoted-type-representation
Use canonical Type constructor
2 parents af70c5f + b28f4b0 commit 4ad3ffb

File tree

60 files changed

+121
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+121
-121
lines changed

tests/neg-macros/delegate-match-1/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inline def f: Any = ${ fImpl }
55

66
private def fImpl(using qctx: QuoteContext): Expr[Unit] = {
77
import qctx.reflect._
8-
Implicits.search(('[A]).unseal.tpe) match {
8+
Implicits.search((Type[A]).unseal.tpe) match {
99
case x: ImplicitSearchSuccess =>
1010
'{}
1111
case x: DivergingImplicit => '{}

tests/neg-macros/delegate-match-2/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inline def f: Any = ${ fImpl }
55

66
private def fImpl (using qctx: QuoteContext) : Expr[Unit] = {
77
import qctx.reflect._
8-
Implicits.search(('[A]).unseal.tpe) match {
8+
Implicits.search((Type[A]).unseal.tpe) match {
99
case x: ImplicitSearchSuccess =>
1010
'{}
1111
case x: DivergingImplicit => '{}

tests/neg-macros/delegate-match-3/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inline def f: Any = ${ fImpl }
55

66
private def fImpl(using qctx: QuoteContext) : Expr[Unit] = {
77
import qctx.reflect._
8-
Implicits.search(('[A]).unseal.tpe) match {
8+
Implicits.search((Type[A]).unseal.tpe) match {
99
case x: ImplicitSearchSuccess =>
1010
'{}
1111
case x: DivergingImplicit => '{}

tests/neg-macros/i4493-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Index[K]
22
object Index {
33
inline def succ[K](x: K): Unit = ${
4-
implicit val t: quoted.Type[K] = '[K] // error
4+
implicit val t: quoted.Type[K] = Type[K] // error
55
'{new Index[K]}
66
}
77
}

tests/neg-macros/i4493.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Index[K]
22
object Index {
33
inline def succ[K]: Unit = ${
4-
implicit val t: quoted.Type[K] = '[K] // error
4+
implicit val t: quoted.Type[K] = Type[K] // error
55
'{new Index[K]}
66
}
77
}

tests/neg-macros/i6530.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
object Macros {
2-
inline def q : Int = ${ '[ Int ] } // error
2+
inline def q : Int = ${ Type[ Int ] } // error
33
val x : Int = 1 + q
44
}

tests/neg-macros/i6530b.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ object Foo {
44
val tpe: quoted.Type[Int] = ???
55
val expr: quoted.Expr[Int] = ???
66

7-
val a: quoted.Expr[Int] = ${ '[Int] } // error
7+
val a: quoted.Expr[Int] = ${ Type[Int] } // error
88
val b: quoted.Expr[Int] = '{ $tpe } // error
99
val c: ${ '{ 43 } } = ??? // error
10-
val d: quoted.Type[Int] = '[ $expr ] // error
10+
val d: quoted.Type[Int] = Type[ $expr ] // error
1111
}
1212
}

tests/neg-macros/i7013.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import quoted._
22

33
def foo()(using QuoteContext) = {
44
class C
5-
'[C] // error
5+
Type[C] // error
66
}

tests/neg-macros/i7013b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import quoted._
33
class Foo {
44
class Bar
55
def foo()(using QuoteContext) = {
6-
'[Bar] // error
6+
Type[Bar] // error
77
}
88
}

tests/neg-macros/i7013c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import quoted._
22

33
def foo()(using QuoteContext) = {
44
type C
5-
'[C] // error
5+
Type[C] // error
66
}

0 commit comments

Comments
 (0)