Fix return type of private members that return anonymous object
#KT-16813 Fixed Anonymous objects returned from private-in-file members should behave as for private class members
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
private var x = object {}
|
||||
|
||||
fun test() {
|
||||
// No error, because the type of x is normalized to Any
|
||||
x = object {}
|
||||
x = <!TYPE_MISMATCH!>object<!> {}
|
||||
}
|
||||
Reference in New Issue
Block a user