Skip to content

Commit 05a9ad2

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import core.TypeErasure.erasure
1212
import core.Types._
1313
import core.classfile.ClassfileConstants
1414
import ast.Trees._
15+
import SymUtils._
1516
import TypeUtils._
1617
import java.lang.StringBuilder
1718

@@ -500,7 +501,8 @@ object GenericSignatures {
500501
case PolyType(_, _) =>
501502
true
502503
case ClassInfo(_, _, parents, _, _) =>
503-
foldOver(tp.typeParams.nonEmpty, parents)
504+
// Local classes don't need a signature
505+
!tp.classSymbol.isLocal && foldOver(tp.typeParams.nonEmpty, parents)
504506
case AnnotatedType(tpe, _) =>
505507
foldOver(x, tpe)
506508
case proxy: TypeProxy =>

0 commit comments

Comments
 (0)