Kotlin collection.map supported yet

I am trying to compile this sample which maps users by lastname, but it fails with "Compiler terminated with exit code: -1". Am I missing anything?

import std.util.* import std.*

fun main(args : Array<String>) {
  val users = arrayList(
  User(“John”, “Doe1”, 31),
  User(“John”, “Doe2”, 32),
  User(“John”, “Doe3”, 33))

  val usersByLastName = users.map {it.lastName}
  for (item in usersByLastName) {
  println(item)
  }
}


Here is the User.kt:

public class User(val firstName: String, val lastName: String, val age: Int) {
  fun toString() =“$firstName $lastName, age $age”
}

No, you are not. It's a bug in type inference. Will be fixed soon. Workaround: import std.util.* import std.*

fun main(args : Array<String>) {
  val users = arrayList(
  User(“John”, “Doe1”, 31),
  User(“John”, “Doe2”, 32),
  User(“John”, “Doe3”, 33))

  val usersByLastName = users.map {(it : User) -> it.lastName}
  for (item in usersByLastName) {
  println(item)
  }
}

Thanks Andrey, that works! I assume extension methods min(), max() are still in the works.