Skip to content

Commit 21ebb62

Browse files
oderskyWojciechMazur
authored andcommitted
Avoid adding redundant Deferred flag to type parameters in Namer
[Cherry-picked a782148]
1 parent 92aa2e5 commit 21ebb62

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ private class ExtractAPICollector(using Context) extends ThunkHolder {
445445
if (sym.isAliasType)
446446
api.TypeAlias.of(name, access, modifiers, as.toArray, typeParams, apiType(tpe.bounds.hi))
447447
else {
448-
assert(sym.isAbstractType)
448+
assert(sym.isAbstractOrParamType)
449449
api.TypeDeclaration.of(name, access, modifiers, as.toArray, typeParams, apiType(tpe.bounds.lo), apiType(tpe.bounds.hi))
450450
}
451451
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class Namer { typer: Typer =>
271271
analyzeRHS(body)
272272
case _ =>
273273
if rhs.isEmpty || flags.is(Opaque) then flags |= Deferred
274-
analyzeRHS(tree.rhs)
274+
if flags.is(Param) then tree.rhs else analyzeRHS(tree.rhs)
275275

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

0 commit comments

Comments
 (0)