Skip to content

Commit

Permalink
bugfix: Fix compilation after merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Feb 7, 2025
1 parent 3dc441b commit 4b0eebf
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 22 deletions.
6 changes: 1 addition & 5 deletions compiler/src/dotty/tools/dotc/config/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ object Settings:

def deprecated(msg: String, extraArgs: List[String] = Nil): Settings.ArgsSummary =
ArgsSummary(sstate, extraArgs ++ arguments.tail, errors, warnings :+ msg)

@unshared
val settingCharacters = "[a-zA-Z0-9_\\-]*".r
def validateSettingString(name: String): Unit =
assert(settingCharacters.matches(name), s"Setting string $name contains invalid characters")
}

/** List of setting-value pairs that are required for another setting to be valid.
* For example, `s = Setting(..., depends = List(YprofileEnabled -> true))`
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/core/Phases.scala
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ object Phases {

// Test that we are in a state where we need to check if the phase should be skipped for a java file,
// this prevents checking the expensive `unit.typedAsJava` unnecessarily.
val doCheckJava = skipIfJava && !isAfterLastJavaPhase
for unit <- units do ctx.profiler.onUnit(this, unit):
given unitCtx: Context = runCtx.fresh.setPhase(this.start).setCompilationUnit(unit).withRootImports
if ctx.run.enterUnit(unit) then
Expand Down
3 changes: 1 addition & 2 deletions compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import java.nio.channels.ClosedByInterruptException

import scala.util.control.NonFatal

import dotty.tools.dotc.classpath.FileUtils.{hasTastyExtension, hasBetastyExtension}
import dotty.tools.io.{ ClassPath, ClassRepresentation, AbstractFile, NoAbstractFile }
import dotty.tools.backend.jvm.DottyBackendInterface.symExtensions

Expand Down Expand Up @@ -338,7 +337,7 @@ abstract class SymbolLoader extends LazyType { self =>
val sym = root.symbol
def associatedFile = root.symbol.associatedFile match
case file: AbstractFile => file
case _ => NoAbstractFile
case null => NoAbstractFile
ctx.profiler.onCompletion(sym, associatedFile)(body)
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/TypeOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ object TypeOps:
}

val inferThisMap = new InferPrefixMap
val tvars = tp1.etaExpand match
val tvars = tp1.EtaExpand(tp1.typeParams) match
case eta: TypeLambda => constrained(eta)
case _ => Nil
val protoTp1 = inferThisMap.apply(tp1).appliedTo(tvars)
Expand Down
13 changes: 0 additions & 13 deletions compiler/src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2490,19 +2490,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
if filters == List(MessageFilter.None) then sup.markUsed()
ctx.run.nn.suppressions.addSuppression(sup)

/** Run `typed` on `rhs` except if `rhs` is the right hand side of a deferred given,
* in which case the empty tree is returned.
*/
private inline def excludeDeferredGiven(
rhs: untpd.Tree, sym: Symbol)(
inline typed: untpd.Tree => Tree)(using Context): Tree =
rhs match
case rhs: RefTree
if rhs.name == nme.deferred && sym.isAllOf(DeferredGivenFlags, butNot = Param) =>
EmptyTree
case _ =>
typed(rhs)

def typedValDef(vdef: untpd.ValDef, sym: Symbol)(using Context): Tree = ctx.profiler.onTypedDef(sym) {
val ValDef(name, tpt, _) = vdef
completeAnnotations(vdef, sym)
Expand Down

0 comments on commit 4b0eebf

Please sign in to comment.