Forbid create expected on class member when class has no expected itself

Related to KT-27075
This commit is contained in:
Mikhail Glukhikh
2018-11-20 17:42:59 +03:00
parent 8b7c7dbe25
commit a4214f13c8
4 changed files with 35 additions and 0 deletions
@@ -0,0 +1,2 @@
// My: to be implemented
// DISABLE-ERRORS
@@ -0,0 +1,24 @@
// "Create expected function in common module testModule_Common" "false"
// ACTION: Convert member to extension
// ACTION: Convert to block body
// ACTION: Move to companion object
// ACTION: Remove 'actual' modifier
// ACTION: Remove explicit type specification
// DISABLE-ERRORS
actual class My {
actual fun <caret>foo(param: String): Int = 42
actual fun String.bar(y: Double): Boolean = true
actual fun baz() {}
actual constructor(flag: Boolean) {}
actual val isGood: Boolean
get() = true
actual var status: Int
get() = 0
set(value) {}
}