Skip to content

Commit 8d9fa9c

Browse files
committed
Avoid list allocation
1 parent ea5fb1f commit 8d9fa9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
106106

107107
initJClass(cnode)
108108

109-
val methodSymbols = for (f <- cd.symbol.info.decls.toList if f.is(Method) && f.isTerm && !f.is(Module)) yield f
109+
val methodSymbols = for (f <- cd.symbol.info.decls.iterator if f.is(Method) && f.isTerm && !f.is(Module)) yield f
110110
val hasStaticCtor = methodSymbols exists (_.isStaticConstructor)
111111
if (!hasStaticCtor) {
112112
// but needs one ...

0 commit comments

Comments
 (0)