Adjust JS backend to CharSequence.length transformation
This commit is contained in:
committed by
Mikhail Glukhikh
parent
1305d9755a
commit
cb562e7ea5
+1
-3
@@ -26,10 +26,8 @@ public final class StringOperationFIF extends CompositeFIF {
|
||||
public static final FunctionIntrinsicFactory INSTANCE = new StringOperationFIF();
|
||||
|
||||
private StringOperationFIF() {
|
||||
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", "get").checkOverridden(), new BuiltInFunctionIntrinsic("charAt"));
|
||||
add(pattern("kotlin", "CharSequence", "length").checkOverridden(), LENGTH_PROPERTY_INTRINSIC);
|
||||
add(pattern("kotlin", "CharSequence", "<get-length>").checkOverridden(), LENGTH_PROPERTY_INTRINSIC);
|
||||
add(pattern("kotlin", "CharSequence", "subSequence").checkOverridden(), new BuiltInFunctionIntrinsic("substring"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user