'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,10 @@
interface Parent
interface Child : Parent
sealed class Page : Parent {
object One : Page(), Child
object Two : Page(), Child
}
// Ok: page is a Parent so it can be easily a Child
fun test(page: Page): Boolean = page is Child