Transform *Array.size to properties
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ public final class ArrayFIF extends CompositeFIF {
|
||||
private ArrayFIF() {
|
||||
add(pattern(ARRAYS, "get"), GET_INTRINSIC);
|
||||
add(pattern(ARRAYS, "set"), SET_INTRINSIC);
|
||||
add(pattern(ARRAYS, "size"), LENGTH_PROPERTY_INTRINSIC);
|
||||
add(pattern(ARRAYS, "<get-size>"), LENGTH_PROPERTY_INTRINSIC);
|
||||
add(pattern(ARRAYS, "iterator"), new KotlinFunctionIntrinsic("arrayIterator"));
|
||||
add(pattern(NUMBER_ARRAY, "<init>"),new KotlinFunctionIntrinsic("numberArrayOfSize"));
|
||||
add(pattern(CHAR_ARRAY, "<init>"), new KotlinFunctionIntrinsic("charArrayOfSize"));
|
||||
|
||||
@@ -6,4 +6,4 @@ class A() {
|
||||
val a1 = arrayOfNulls<Int>(3)
|
||||
val a2 = arrayOfNulls<A>(2)
|
||||
|
||||
fun box() = (a1.size() == 3 && a2.size() == 2)
|
||||
fun box() = (a1.size == 3 && a2.size == 2)
|
||||
Reference in New Issue
Block a user