data + open / inner / abstract / sealed are now forbidden

This commit is contained in:
Mikhail Glukhikh
2015-10-05 12:24:30 +03:00
committed by Mikhail Glukhikh
parent 3725ef8cdf
commit fff434d377
24 changed files with 16 additions and 188 deletions
@@ -6,7 +6,9 @@ abstract class Foo {
fun box(): String {
return object: Foo() {
inner data class NestedFoo(val bar: Bar)
inner class NestedFoo(val bar: Bar) {
fun copy(bar: Bar) = NestedFoo(bar)
}
override fun foo(): String {
return NestedFoo(Bar("Fail")).copy(bar = Bar("OK")).bar.name