data + open / inner / abstract / sealed are now forbidden
This commit is contained in:
committed by
Mikhail Glukhikh
parent
3725ef8cdf
commit
fff434d377
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user