Skip to content

Commit a782148

Browse files
committed
Avoid adding redundant Deferred flag to type parameters in Namer
1 parent 413c667 commit a782148

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ private class ExtractAPICollector(nonLocalClassSymbols: mutable.HashSet[Symbol])
564564
if (sym.isAliasType)
565565
api.TypeAlias.of(name, access, modifiers, as.toArray, typeParams, apiType(tpe.bounds.hi))
566566
else {
567-
assert(sym.isAbstractType)
567+
assert(sym.isAbstractOrParamType)
568568
api.TypeDeclaration.of(name, access, modifiers, as.toArray, typeParams, apiType(tpe.bounds.lo), apiType(tpe.bounds.hi))
569569
}
570570
}

compiler/src/dotty/tools/dotc/typer/Namer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class Namer { typer: Typer =>
274274
analyzeRHS(body)
275275
case _ =>
276276
if rhs.isEmpty || flags.is(Opaque) then flags |= Deferred
277-
analyzeRHS(tree.rhs)
277+
if flags.is(Param) then tree.rhs else analyzeRHS(tree.rhs)
278278

279279
// to complete a constructor, move one context further out -- this
280280
// is the context enclosing the class. Note that the context in which a

0 commit comments

Comments
 (0)