Skip to content

Commit 799f6e4

Browse files
committed
Also erase methods with erased class results
1 parent 313221a commit 799f6e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,7 @@ class Typer extends Namer
21812181
private def postProcessInfo(sym: Symbol)(using Context): Unit =
21822182
if (!sym.isOneOf(Synthetic | InlineProxy | Param) && sym.info.finalResultType.isRepeatedParam)
21832183
report.error(em"Cannot return repeated parameter type ${sym.info.finalResultType}", sym.srcPos)
2184-
if !sym.is(Module) && sym.info.isErasedClass then
2184+
if !sym.is(Module) && !sym.isConstructor && sym.info.finalResultType.isErasedClass then
21852185
sym.setFlag(Erased)
21862186

21872187
def typedTypeDef(tdef: untpd.TypeDef, sym: Symbol)(using Context): Tree = {

0 commit comments

Comments
 (0)