Skip to content

Commit 459548b

Browse files
committed
PR feedback
1 parent c0ddd34 commit 459548b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ class GenBCode extends Phase { self =>
8181
private var _knownBTypes: KnownBTypes | Null = null
8282
def knownBTypes(using Context): KnownBTypes = {
8383
if _knownBTypes eq null then
84-
_knownBTypes = KnownBTypes(bTypeLoader)(using ctx)
84+
if ctx.settings.optInlineEnabled || ctx.settings.optClosureInvocations then
85+
_knownBTypes = optimizerKnownBTypes // avoid creating two separate instances of this
86+
else
87+
_knownBTypes = KnownBTypes(bTypeLoader)(using ctx)
8588
_knownBTypes.nn
8689
}
8790

0 commit comments

Comments
 (0)