Remove inapplicable TODO re: K<->J type substitution

Turns out the two use cases the TODO worried about are already taken care of: `Unit` is replaced with `void` only in contexts where primitives can be used, and `List` and similar only have incompatible extension methods, which are declared by `CollectionsKt` not `List`. This is likely deliberate to enable the Kotlin <-> Java substitution to be implemented simply by kotlinc.
This commit is contained in:
Chris Smowton
2022-02-10 15:19:20 +00:00
committed by Ian Lynagh
parent d593185a8c
commit d103bf65bd

View File

@@ -191,10 +191,6 @@ open class KotlinUsesExtractor(
logger.error("Unexpected access to anonymous class instance")
}
// TODO: only substitute in class and function signatures
// because within function bodies we can get things like Unit.INSTANCE
// and List.asIterable (an extension, i.e. static, method)
// Map Kotlin class to its equivalent Java class:
val substituteClass = getJavaEquivalentClass(c)
val extractClass = substituteClass ?: c