Inline function: add extra tests taken from intellij-community

This commit is contained in:
Mikhail Glukhikh
2017-03-30 17:21:46 +03:00
parent b8b7d1f644
commit 8cfcd7e5a6
37 changed files with 661 additions and 0 deletions
@@ -0,0 +1,39 @@
class Foo {
fun method(b: Boolean,
elementComputable: Computable<String>,
processingContext: Any): WeighingComparable<String, ProximityLocation> {
return weigh(WEIGHER_KEY, elementComputable, ProximityLocation())
}
companion object {
fun <T, Loc> <caret>weigh(
key: Key<out Weigher<T, Loc>>?, element: Computable<T>, location: Loc
): WeighingComparable<T, Loc> {
return WeighingComparable(element, location, Array<Weigher<*, *>>(0) { null!! })
}
val WEIGHER_KEY: Key<ProximityWeigher>? = null
}
}
abstract class ProximityWeigher : Weigher<String, ProximityLocation>()
class ProximityLocation
class Key<P>
open class Weigher<A, B>
class Computable<O>
class WeighingComparable<T, Loc>(element: Computable<T>, location: Loc, weighers: Array<Weigher<*, *>>) : Comparable<WeighingComparable<T, Loc>> {
override fun compareTo(other: WeighingComparable<T, Loc>): Int {
return 0
}
private fun getWeight(index: Int): Comparable<*>? {
return null
}
}