There was an error while loading. Please reload this page.
1 parent c0ddd34 commit 459548bCopy full SHA for 459548b
1 file changed
compiler/src/dotty/tools/backend/jvm/GenBCode.scala
@@ -81,7 +81,10 @@ class GenBCode extends Phase { self =>
81
private var _knownBTypes: KnownBTypes | Null = null
82
def knownBTypes(using Context): KnownBTypes = {
83
if _knownBTypes eq null then
84
- _knownBTypes = KnownBTypes(bTypeLoader)(using ctx)
+ 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)
88
_knownBTypes.nn
89
}
90
0 commit comments