Refactor JvmPackagePartProvider

Make code more imperative than functional, preserve the information about the
original root where the module mapping was discovered
This commit is contained in:
Alexander Udalov
2016-12-29 20:04:46 +03:00
parent 0dbb02ec6a
commit db3fa8eaca
3 changed files with 45 additions and 20 deletions
@@ -95,6 +95,11 @@ class PackageParts(val packageFqName: String) {
}
}
operator fun plusAssign(other: PackageParts) {
parts.addAll(other.parts)
metadataParts.addAll(other.metadataParts)
}
override fun equals(other: Any?) =
other is PackageParts && other.packageFqName == packageFqName && other.parts == parts && other.metadataParts == metadataParts