[JVM_IR] Guard against infinite recursion in JvmIrCodegenFactory.
Fixed KTIJ-11580.
This commit is contained in:
committed by
Alexander Udalov
parent
d70b889004
commit
6bc4e124fb
+1
-2
@@ -171,8 +171,7 @@ open class JvmIrCodegenFactory(
|
||||
val result = LinkedHashSet<ModuleDescriptor>()
|
||||
fun collectImpl(descriptor: ModuleDescriptor) {
|
||||
val dependencies = descriptor.allDependencyModules
|
||||
dependencies.forEach { if (it !in result) collectImpl(it) }
|
||||
result += dependencies
|
||||
dependencies.forEach { if (result.add(it)) collectImpl(it) }
|
||||
}
|
||||
collectImpl(this)
|
||||
return result.toList()
|
||||
|
||||
Reference in New Issue
Block a user