Skip to content

Commit 3c4d29e

Browse files
authored
Merge pull request #2061 from dotty-staging/fix/overcompilation-api
Fix incremental overcompilation due to instabilities
2 parents bade85e + b2f30ed commit 3c4d29e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,15 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
350350
case tp: NamedType =>
351351
val sym = tp.symbol
352352
// Normalize package prefix to avoid instability of representation
353-
val prefix = if (sym.isClass && sym.owner.is(Package))
353+
val prefix = if (sym.owner.is(Package))
354354
sym.owner.thisType
355355
else
356356
tp.prefix
357357
new api.Projection(simpleType(prefix), sym.name.toString)
358358
case TypeApplications.AppliedType(tycon, args) =>
359359
def processArg(arg: Type): api.Type = arg match {
360360
case arg @ TypeBounds(lo, hi) => // Handle wildcard parameters
361-
if (lo.eq(defn.NothingType) && hi.eq(defn.AnyType))
361+
if (lo.isDirectRef(defn.NothingClass) && hi.isDirectRef(defn.AnyClass))
362362
Constants.emptyType
363363
else {
364364
val name = "_"

0 commit comments

Comments
 (0)