Disallowed using type parameter as reified type argument.
#KT-3050 fixed
This commit is contained in:
@@ -6,9 +6,6 @@ public inline fun <T> Array<T>.isNotEmpty() : Boolean = !this.isEmpty()
|
||||
/** Returns true if the array is empty */
|
||||
public inline fun <T> Array<T>.isEmpty() : Boolean = this.size == 0
|
||||
|
||||
/** Returns the array if its not null or else returns an empty array */
|
||||
public inline fun <T> Array<out T>?.orEmpty() : Array<out T> = if (this != null) this else array<T>()
|
||||
|
||||
public inline val BooleanArray.lastIndex : Int
|
||||
get() = this.size - 1
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.Arrays
|
||||
import jet.runtime.Intrinsic
|
||||
|
||||
// Array "constructor"
|
||||
[Intrinsic("kotlin.arrays.array")] public inline fun <T> array(vararg t : T) : Array<T> = t
|
||||
[Intrinsic("kotlin.arrays.array")] public inline fun <reified T> array(vararg t : T) : Array<T> = t
|
||||
|
||||
// "constructors" for primitive types array
|
||||
[Intrinsic("kotlin.arrays.array")] public inline fun doubleArray(vararg content : Double) : DoubleArray = content
|
||||
|
||||
@@ -8,7 +8,7 @@ import jet.runtime.Intrinsic
|
||||
[Intrinsic("kotlin.javaClass.property")] public val <T> T.javaClass : Class<T>
|
||||
get() = (this as java.lang.Object).getClass() as Class<T>
|
||||
|
||||
[Intrinsic("kotlin.javaClass.function")] fun <T> javaClass() : Class<T> = null as Class<T>
|
||||
[Intrinsic("kotlin.javaClass.function")] fun <reified T> javaClass() : Class<T> = null as Class<T>
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user