From 1010c8379fb28c2d614f329eee8106d234d6f354 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Tue, 15 Sep 2020 11:19:21 +0200 Subject: [PATCH] Remove Reflect.MatchCaseType Can be replaced with `Type.of[scala.internal.MatchCase]` --- library/src/scala/tasty/Reflection.scala | 9 --------- tests/run-macros/tasty-construct-types/Macro_1.scala | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/library/src/scala/tasty/Reflection.scala b/library/src/scala/tasty/Reflection.scala index c0ade4538eb7..ea0f67761f81 100644 --- a/library/src/scala/tasty/Reflection.scala +++ b/library/src/scala/tasty/Reflection.scala @@ -1642,15 +1642,6 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface => end extension end MatchTypeOps - // TODO remove this definition from here - /** - * An accessor for `scala.internal.MatchCase[_,_]`, the representation of a `MatchType` case. - */ - def MatchCaseType(using ctx: Context): Type = { - import scala.internal.MatchCase - Type(classOf[MatchCase[_,_]]) - } - given (using ctx: Context) as TypeTest[Type, ByNameType] = reflectSelf.ByNameType_TypeTest object ByNameType: diff --git a/tests/run-macros/tasty-construct-types/Macro_1.scala b/tests/run-macros/tasty-construct-types/Macro_1.scala index 3108c7c89895..971fe363ebb5 100644 --- a/tests/run-macros/tasty-construct-types/Macro_1.scala +++ b/tests/run-macros/tasty-construct-types/Macro_1.scala @@ -37,7 +37,7 @@ object Macros { TypeLambda( List("t"), _ => List(TypeBounds(Type.of[Nothing], Type.of[Any])), - tl => MatchCaseType.appliedTo(List(Type.of[List].appliedTo(tl.param(0)), tl.param(0))))) + tl => Type.of[scala.internal.MatchCase].appliedTo(List(Type.of[List].appliedTo(tl.param(0)), tl.param(0))))) ) assert(x1T =:= '[1].unseal.tpe)