Skip to content

Commit cb220c9

Browse files
committed
Don't generate generic signature for local classes
1 parent 7d07d42 commit cb220c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ object GenericSignatures {
500500
case PolyType(_, _) =>
501501
true
502502
case ClassInfo(_, _, parents, _, _) =>
503-
foldOver(tp.typeParams.nonEmpty, parents)
503+
// Local classes don't need a signature
504+
!tp.classSymbol.owner.is(Method) && foldOver(tp.typeParams.nonEmpty, parents)
504505
case AnnotatedType(tpe, _) =>
505506
foldOver(x, tpe)
506507
case proxy: TypeProxy =>

0 commit comments

Comments
 (0)