Extraction Engine: Do not add variance to type parameters in generated declaration

This commit is contained in:
Alexey Sedunov
2015-09-14 13:28:36 +03:00
parent 4f7b978bbc
commit 34b279a7a8
4 changed files with 43 additions and 1 deletions
@@ -0,0 +1,13 @@
// PARAM_DESCRIPTOR: val e: T? defined in EntityClass.foo
// PARAM_TYPES: T?, Entity?
// SIBLING:
abstract public class EntityClass<out T: Entity>() {
fun foo() {
val e: T? = null
<selection>e?.value</selection>
}
}
open class Entity {
var value: String? = null
}
@@ -0,0 +1,17 @@
// PARAM_DESCRIPTOR: val e: T? defined in EntityClass.foo
// PARAM_TYPES: T?, Entity?
// SIBLING:
abstract public class EntityClass<out T: Entity>() {
fun foo() {
val e: T? = null
__dummyTestFun__(e)
}
}
private fun <T : Entity> __dummyTestFun__(e: T?) {
e?.value
}
open class Entity {
var value: String? = null
}