Rename CharSequence.get to charAt
This is done for JVM interoperability. There's still a member function String.get() and an extension function "get" on CharSequence #KT-1730 Fixed #KT-5389 Fixed
This commit is contained in:
@@ -27,8 +27,6 @@ public fun String.split(regex: String, limit: Int): Array<String> = noImpl
|
||||
native public fun String.substring(beginIndex : Int) : String = noImpl
|
||||
native public fun String.substring(beginIndex : Int, endIndex : Int) : String = noImpl
|
||||
|
||||
native public fun String.charAt(index : Int) : Char = noImpl
|
||||
|
||||
native public fun String.concat(str : String) : String = noImpl
|
||||
|
||||
native public fun String.match(regex : String) : Array<String> = noImpl
|
||||
|
||||
+3
-1
@@ -26,7 +26,9 @@ public final class StringOperationFIF extends CompositeFIF {
|
||||
public static final FunctionIntrinsicFactory INSTANCE = new StringOperationFIF();
|
||||
|
||||
private StringOperationFIF() {
|
||||
add(pattern("kotlin", "CharSequence", "get").checkOverridden(), new BuiltInFunctionIntrinsic("charAt"));
|
||||
add(pattern("kotlin", "String", "get"), new BuiltInFunctionIntrinsic("charAt"));
|
||||
// This intrinsic is needed because charAt is a public function taking one parameter and thus its name would be mangled otherwise
|
||||
add(pattern("kotlin", "CharSequence", "charAt").checkOverridden(), new BuiltInFunctionIntrinsic("charAt"));
|
||||
add(pattern("kotlin", "CharSequence", "length").checkOverridden(), LENGTH_PROPERTY_INTRINSIC);
|
||||
add(pattern("kotlin.js", "isEmpty").isExtensionOf("kotlin.CharSequence"), IS_EMPTY_INTRINSIC);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user