Noticed a different behavior for string concatenat...
# javascript
e
Noticed a different behavior for string concatenation in 2.0.20-RC compared to 1.9.24. For a statement like:
Copy code
val e = mapOf("one" to "two")
println("example: $e")
The output in 1.9.24 was:
Copy code
var e = mapOf(to('one', 'two'));
println('example: ' + e);
While in 2.0.20-RC it is:
Copy code
var e = mapOf(to('one', 'two'));
println('example: ' + toString_0(e));
Was that wanted or is it accidental?
toString_0
is:
Copy code
function toString_0(_this__u8e3s4) {
  var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4);
  return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;
}

function toString_1(o) {
  var tmp;
  if (o == null) {
    tmp = 'null';
  } else if (isArrayish(o)) {
    tmp = '[...]';
  } else if (!(typeof o.toString === 'function')) {
    tmp = anyToString(o);
  } else {
    // Inline function 'kotlin.js.unsafeCast' call
    tmp = o.toString();
  }
  return tmp;
}