Skip to content

Commit 16389b9

Browse files
committed
Performance tweak
1 parent 95f3e25 commit 16389b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala

+1-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
170170
cpy.TypeDef(cd0)(rhs = impl2)
171171
} else cd0
172172

173-
val methodSymbols = for (f <- cd.symbol.info.decls.toList if f.is(Method) && f.isTerm && !f.is(Module)) yield f
174-
val hasStaticCtor = methodSymbols exists (_.isStaticConstructor)
173+
val hasStaticCtor = isCZStaticModule || cd.symbol.info.decls.exists(_.isStaticConstructor)
175174
if (!hasStaticCtor && isCZParcelable) fabricateStaticInitAndroid()
176175

177176
val optSerial: Option[Long] =

0 commit comments

Comments
 (0)