Skip to content

Commit ab8a677

Browse files
committed
Remove deadcode
1 parent 6f600b2 commit ab8a677

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import scala.quoted.{Expr, Type, QuoteContext}
2828
class QuoteCompiler extends Compiler {
2929

3030
override protected def frontendPhases: List[List[Phase]] =
31-
List(List(new QuotedFrontend(putInClass = true)))
31+
List(List(new QuotedFrontend))
3232

3333
override protected def picklerPhases: List[List[Phase]] =
3434
List(List(new Staging))
@@ -41,17 +41,15 @@ class QuoteCompiler extends Compiler {
4141
def outputClassName: TypeName = "Generated$Code$From$Quoted".toTypeName
4242

4343
/** Frontend that receives a scala.quoted.Expr or scala.quoted.Type as input */
44-
class QuotedFrontend(putInClass: Boolean) extends Phase {
44+
class QuotedFrontend extends Phase {
4545
import tpd._
4646

4747
def phaseName: String = "quotedFrontend"
4848

4949
override def runOn(units: List[CompilationUnit])(implicit ctx: Context): List[CompilationUnit] = {
5050
units.map {
5151
case exprUnit: ExprCompilationUnit =>
52-
val tree =
53-
if (putInClass) inClass(exprUnit.exprBuilder)
54-
else PickledQuotes.quotedExprToTree(checkValidRunExpr(exprUnit.exprBuilder.apply(new QuoteContext(ReflectionImpl(ctx)))))
52+
val tree = inClass(exprUnit.exprBuilder)
5553
val source = SourceFile.virtual("<quoted.Expr>", "")
5654
CompilationUnit(source, tree, forceTrees = true)
5755
}

0 commit comments

Comments
 (0)