Misc: Use delegate with predefined name for fake light methods

#KT-21414 Fixed
This commit is contained in:
Alexey Sedunov
2017-11-30 13:07:47 +03:00
parent 89352a295d
commit ec85b708c9
4 changed files with 44 additions and 2 deletions
@@ -0,0 +1,21 @@
package test
open class <lineMarker>SimpleParent</lineMarker> {
open fun <lineMarker>`foo fun`</lineMarker>(n: Int) {}
open val <lineMarker>`bar fun`</lineMarker>: Int get() = 1
}
expect open class <lineMarker><lineMarker>ExpectedChild</lineMarker></lineMarker> : SimpleParent {
override fun <lineMarker><lineMarker>`foo fun`</lineMarker></lineMarker>(n: Int)
override val <lineMarker><lineMarker>`bar fun`</lineMarker></lineMarker>: Int
}
class ExpectedChildChild : ExpectedChild() {
override fun <lineMarker>`foo fun`</lineMarker>(n: Int) {}
override val <lineMarker>`bar fun`</lineMarker>: Int get() = 1
}
class SimpleChild : SimpleParent() {
override fun <lineMarker>`foo fun`</lineMarker>(n: Int) {}
override val <lineMarker>`bar fun`</lineMarker>: Int get() = 1
}
@@ -0,0 +1,13 @@
// !CHECK_HIGHLIGHTING
package test
actual open class ExpectedChild : SimpleParent() {
actual override fun `foo fun`(n: Int) {}
actual override val `bar fun`: Int get() = 1
}
class ExpectedChildChildJvm : ExpectedChild() {
override fun `foo fun`(n: Int) {}
override val `bar fun`: Int get() = 1
}