Language

All previously deprecated language constructs are now errors, not warnings.

All deprecated declarations previously generated in the byte code (such as static fields in interfaces etc) have been removed.

Most other language changes are minor tweaks and bug fixes. Some highlights are given below. See the full list here.

Annotations on delegate fields

The new @delegate: annotation target (use-site) is now supported. For example, to mark the delegate object as @Transient, we can say:

1

2

3

4

5

classExample{

@delegate:Transient

valfoobyLazy{...}

}

In the byte code, the field holding the delegate will be annotated.

Type checking for use-site variance

We have fixed a number of annoying bugs connected with use-site variance (type projections). As a result, the compiler may find some previously missed bugs in your code.
For example, in the following case:

1

2

3

4

5

val ints=mutableListOf(1,2,3)

val strs=mutableListOf("abc","def")

val comps:MutableList<out Comparable<*>>=ints

comps.addAll(strs)// ?! Adding strings to a list of ints

This code was mistakenly accepted before and is rejected now on the last line with the message:

Ok, I went thru Stackoverflow question by link bellow. If I put “org.jetbrains.kotlin:kotlin-gradle-plugin” dependency instead, it works. But it strange, guys You have to fix it. If plugin dependency defined in global script, why it is required in module script also?

While the list of changes is great, there’s little additional information about what defines the release candidate here. What makes it different from a beta? What sort of changes can we expect to find or not find between now and 1.0? Is there a roadmap or timeline for 1.0, now that we’re relatively close, or is it still a “when it’s done” sort of thing? What are the main factors in determining when to release 1.0?