From ecb434d3286cb697090a2735b0ab736f2437e1b4 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 12 Jan 2023 16:19:17 +0100 Subject: [PATCH] Move ErasedFunction to scala.runtime --- compiler/src/dotty/tools/dotc/core/Definitions.scala | 2 +- library/src/scala/{ => runtime}/ErasedFunction.scala | 2 +- .../tasty-inspector/stdlibExperimentalDefinitions.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename library/src/scala/{ => runtime}/ErasedFunction.scala (94%) diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala index 0e64007bdc10..f7d0c0042225 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -1447,7 +1447,7 @@ class Definitions { lazy val PolyFunctionClass = requiredClass("scala.PolyFunction") def PolyFunctionType = PolyFunctionClass.typeRef - lazy val ErasedFunctionClass = requiredClass("scala.ErasedFunction") + lazy val ErasedFunctionClass = requiredClass("scala.runtime.ErasedFunction") def ErasedFunctionType = ErasedFunctionClass.typeRef /** If `cls` is a class in the scala package, its name, otherwise EmptyTypeName */ diff --git a/library/src/scala/ErasedFunction.scala b/library/src/scala/runtime/ErasedFunction.scala similarity index 94% rename from library/src/scala/ErasedFunction.scala rename to library/src/scala/runtime/ErasedFunction.scala index 539851b959ad..7e9211bba75a 100644 --- a/library/src/scala/ErasedFunction.scala +++ b/library/src/scala/runtime/ErasedFunction.scala @@ -1,4 +1,4 @@ -package scala +package scala.runtime import scala.annotation.experimental diff --git a/tests/run-custom-args/tasty-inspector/stdlibExperimentalDefinitions.scala b/tests/run-custom-args/tasty-inspector/stdlibExperimentalDefinitions.scala index fb5a1463decd..b281da2198e7 100644 --- a/tests/run-custom-args/tasty-inspector/stdlibExperimentalDefinitions.scala +++ b/tests/run-custom-args/tasty-inspector/stdlibExperimentalDefinitions.scala @@ -80,7 +80,7 @@ val experimentalDefinitionInLibrary = Set( // New feature: functions with erased parameters. // Need erasedDefinitions enabled. - "scala.ErasedFunction" + "scala.runtime.ErasedFunction" )