Fix tests not to duplicate array constructor definitions as they are available now in builtins.

This commit is contained in:
Ilya Gorbunov
2015-12-11 18:18:23 +03:00
parent f509937037
commit 4dde59368c
22 changed files with 31 additions and 67 deletions
@@ -1,6 +1,3 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
fun bar(x: Int): Int = x + 1
fun foo() {
@@ -1,5 +1,4 @@
package
public inline fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
public fun foo(): kotlin.Unit
@@ -1,6 +1,3 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
fun bar(x: Int): Int = x + 1
fun foo() {
@@ -1,5 +1,4 @@
package
public inline fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
public fun foo(): kotlin.Unit
@@ -1,8 +1,5 @@
// !CHECK_TYPE
@Suppress("UNCHECKED_CAST")
fun <T> arrayOf(vararg t : T) : Array<T> = t as Array<T>
fun test() {
val array = arrayOf(arrayOf(1))
array checkType { _<Array<Array<Int>>>() }
@@ -1,4 +1,3 @@
package
@kotlin.Suppress(names = {"UNCHECKED_CAST"}) public fun </*0*/ T> arrayOf(/*0*/ vararg t: T /*kotlin.Array<out T>*/): kotlin.Array<T>
public fun test(): kotlin.Unit
-3
View File
@@ -1,6 +1,3 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
//KT-1703 Reference to label is unresolved
fun test() {
-1
View File
@@ -1,6 +1,5 @@
package
public inline fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
public fun test(): kotlin.Unit
public fun use(/*0*/ a: kotlin.Any?): kotlin.Any?
public fun </*0*/ T> kotlin.Array<out T>.forEach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit
@@ -10,7 +10,3 @@ enum class MyEnum { A }
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val enumConst: MyEnum = MyEnum.A
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val arrayConst: Array<String> = arrayOf("1")
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val intArrayConst: IntArray = intArrayOf()
// ------------------------------------------------
fun <T> arrayOf(vararg x: T): Array<T> = null!!
fun intArrayOf(): IntArray = null!!
@@ -7,8 +7,6 @@ public const val intArrayConst: kotlin.IntArray
public const val intConst: kotlin.Int = 1
public const val longConst: kotlin.Long = 1.toLong()
public const val stringConst: kotlin.String = "empty"
public fun </*0*/ T> arrayOf(/*0*/ vararg x: T /*kotlin.Array<out T>*/): kotlin.Array<T>
public fun intArrayOf(): kotlin.IntArray
public final enum class MyEnum : kotlin.Enum<MyEnum> {
enum entry A
@@ -1,6 +1,3 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
// KT-312 Nullability problem when a nullable version of a generic type is returned
fun <T> Array<out T>.safeGet(index : Int) : T? {
@@ -3,5 +3,4 @@ package
public val args: kotlin.Array<kotlin.String>
public val name: kotlin.String
public val name1: kotlin.String?
public inline fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
public fun </*0*/ T> kotlin.Array<out T>.safeGet(/*0*/ index: kotlin.Int): T?
@@ -1,6 +1,3 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
class A {
operator fun component1() = 42
operator fun component2() = 42
@@ -1,6 +1,5 @@
package
public inline fun </*0*/ reified T> Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array<T>
public fun foo(/*0*/ a: A, /*1*/ c: kotlin.Int): kotlin.Unit
public final class A {