mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
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:
committed by
Ian Lynagh
parent
d593185a8c
commit
d103bf65bd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user