Skip to content

Commit 6453e9c

Browse files
committed
Remove Type seal from CompilerInterface
Implement unseal in userspace
1 parent b33ca8a commit 6453e9c

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,11 +1901,6 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
19011901
def QuotedType_unseal(self: scala.quoted.Type[?])(using ctx: Context): TypeTree =
19021902
PickledQuotes.quotedTypeToTree(self)
19031903

1904-
/** Convert `Type` to an `quoted.Type[?]` */
1905-
def QuotedType_seal(self: Type)(using ctx: Context): scala.quoted.Type[?] = {
1906-
val dummySpan = ctx.owner.span // FIXME
1907-
new scala.internal.quoted.Type(tpd.TypeTree(self).withSpan(dummySpan), compilerId)
1908-
}
19091904

19101905
/////////////////
19111906
// DEFINITIONS //

library/src/scala/tasty/Reflection.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ class Reflection(private[scala] val internal: CompilerInterface) { self =>
16191619

16201620
/** Convert `Type` to an `quoted.Type[_]` */
16211621
def seal(using ctx: Context): scala.quoted.Type[_] =
1622-
internal.QuotedType_seal(self)
1622+
new scala.internal.quoted.Type(Inferred(self), internal.compilerId)
16231623

16241624
/** Is `self` type the same as `that` type?
16251625
* This is the case iff `self <:< that` and `that <:< self`.

library/src/scala/tasty/reflect/CompilerInterface.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,9 +1446,6 @@ trait CompilerInterface {
14461446
/** View this expression `quoted.Type[T]` as a `TypeTree` */
14471447
def QuotedType_unseal(self: scala.quoted.Type[_])(using ctx: Context): TypeTree
14481448

1449-
/** Convert `Type` to an `quoted.Type[_]` */
1450-
def QuotedType_seal(self: Type)(using ctx: Context): scala.quoted.Type[_]
1451-
14521449

14531450
/////////////////
14541451
// DEFINITIONS //

0 commit comments

Comments
 (0)