Minor: made noImpl generic to avoid using in wrong context.

This commit is contained in:
Zalim Bashorov
2014-09-16 17:06:24 +04:00
parent 30208d5532
commit 38401d04d5
+4 -4
View File
@@ -3,7 +3,7 @@ package kotlin.js
import java.util.*;
native
public val noImpl : Nothing = throw Exception()
public val <T> noImpl: T = throw Exception()
// Drop this after KT-2093 will be fixed and restore MutableMap.set in Maps.kt from MapsJVM.kt
/** Provides [] access to maps */
@@ -17,8 +17,8 @@ public fun println(s : Any?) {}
library("print")
public fun print(s : Any?) {}
//TODO: consistent parseInt
native public fun parseInt(s: String, radix: Int = 10): Int = js.noImpl
native public fun parseInt(s: String, radix: Int = 10): Int = noImpl
library
public fun safeParseInt(s : String) : Int? = js.noImpl
public fun safeParseInt(s : String) : Int? = noImpl
library
public fun safeParseDouble(s : String) : Double? = js.noImpl
public fun safeParseDouble(s : String) : Double? = noImpl