'sealed' is now not 'final' by default + related code changes #KT-10266 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-12-07 19:08:30 +03:00
parent 5b72afe8a0
commit c73f01927a
11 changed files with 85 additions and 13 deletions
@@ -0,0 +1,8 @@
sealed class My(open val x: Int?) {
init {
if (x != null) {
// Should be error: property is open
<!SMARTCAST_IMPOSSIBLE!>x<!>.hashCode()
}
}
}
@@ -0,0 +1,9 @@
package
public sealed class My {
private constructor My(/*0*/ x: kotlin.Int?)
public open val x: kotlin.Int?
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}