Skip to content

Commit 63e875d

Browse files
Adjusting to review comments
1 parent 8c89abd commit 63e875d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

engine/runtime-compiler/src/main/scala/org/enso/compiler/data/BindingsMap.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,13 @@ case class BindingsMap(
108108
private def ensureConvertedToConcrete(): Option[BindingsMap] = {
109109
val r = pendingRepository
110110
if (r != null) {
111-
val res = toConcrete(r, r.getModuleMap).map { b =>
111+
toConcrete(r, r.getModuleMap).map { b =>
112112
pendingRepository = null
113113
this._currentModule = b._currentModule
114114
this._exportedSymbols = b._exportedSymbols
115115
this._resolvedImports = b._resolvedImports
116116
this
117117
}
118-
res
119118
} else {
120119
Some(this)
121120
}
@@ -127,17 +126,14 @@ case class BindingsMap(
127126
): Option[BindingsMap] = {
128127
val newMap = this._currentModule
129128
.toConcrete(moduleMap)
130-
.map { c =>
131-
this._currentModule = c
132-
c
133-
}
134129
.map { module =>
135-
this.copy(_currentModule = module)
130+
this._currentModule = module
131+
this
136132
}
137133

138134
val withImports: Option[BindingsMap] = newMap.flatMap { bindings =>
139135
val newImports = this._resolvedImports.map { imp =>
140-
imp.targets.map { t =>
136+
imp.targets.foreach { t =>
141137
r.ensurePackageIsLoaded(
142138
LibraryName(t.qualifiedName.path(0), t.qualifiedName.path(1))
143139
)

0 commit comments

Comments
 (0)