Has anyone tried Kotlin with Java 11-ea? I’m getti...
# announcements
p
Has anyone tried Kotlin with Java 11-ea? I’m getting a number of warnings and errors, apparently because Java has added stdlib members that conflict with Kotlin stdlib extension members.
i
Could you name some?
o
I think this is strategy how java could screw kotlin over
h
Or we just don't target new java version
Ooh they could add a new feature where if any functions, etc overlap with code, it allows you to use annotations to specify your target method
p
@ilya.gorbunov
String.isBlank()
,
String.repeat()
,
String.lines()
. The kotlinc error message is difficult to understand. I don’t understand why it says these methods are deprecated.
Copy code
Warning:(69, 19) Kotlin: 'repeat(Int): String!' is deprecated. This member is not fully supported by Kotlin compiler, so it may be absent or have different signature in next major version
there’s something to be said for requiring explicit import of all extension members and have them win over the class’ own members. IDE could provide a visual clue in such cases.
i
Are you sure the receiver is kotlin.String and not java.lang.String?
Ok, I've reproduced it with 11-ea, will check with team.