Fixed the problem with 'OnlyInputTypes' annotation

This commit is contained in:
Svetlana Isakova
2015-10-19 17:38:12 +03:00
parent 3476bed18a
commit 6ced795db6
4 changed files with 16 additions and 7 deletions
@@ -11,4 +11,11 @@ class D
fun test1(a: A, b: B, c: C) {
assertEquals1(a, b)
<!TYPE_INFERENCE_ONLY_INPUT_TYPES!>assertEquals1<!>(b, c)
}
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
public fun <@kotlin.internal.OnlyInputTypes T> expect1(expected: T, block: () -> T) {}
fun test() {
expect1(2) { byteArrayOf(1, 2, 3).indexOf(3) }
}
@@ -1,6 +1,8 @@
package
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> assertEquals1(/*0*/ t1: T, /*1*/ t2: T): kotlin.Unit
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> expect1(/*0*/ expected: T, /*1*/ block: () -> T): kotlin.Unit
public fun test(): kotlin.Unit
public fun test1(/*0*/ a: A, /*1*/ b: B, /*2*/ c: C): kotlin.Unit
public open class A {