Hello there. I'm curious what is the reason for In...
# announcements
d
Hello there. I'm curious what is the reason for Int to be replaced with IntRef while compiled using inlining?
Copy code
var someValue: Int = 0
    items.forEach { item ->
        if (item.length > 3)
            someValue++
    }
    print ("$someValue")
This code is compile into something like this:
Copy code
IntRef text1 = new IntRef();
    text1.element = 0;
    Iterable itemsCount = (Iterable)items;
    Iterator index = itemsCount.iterator();

    while(index.hasNext()) {
        Object $receiver$iv = index.next();
        String item = (String)$receiver$iv;
        if(item.length() > 3) {
            int element$iv = text1.element++;
        }
    }

    String var18 = String.valueOf(text1.element);
    System.out.print(var18);