Report missed INLINE_FROM_HIGHER_PLATFORM diagnostic for derived class

Inline function descriptor in derived class represented as FAKE_OVERRIDE.
 So we should find it in base class declaration
 (not interface cause inline function can't be virtual, but always final)
 and then check class version.

 #KT-29402 Fixed
This commit is contained in:
Mikhael Bogdanov
2019-01-21 14:00:44 +01:00
parent b03065b2ba
commit a020170a92
11 changed files with 219 additions and 45 deletions
@@ -13,16 +13,30 @@ fun baz() {
allInline
allInline = 1
val a = A()
a.inlineFun {}
a.inlineGetter
a.inlineGetter = 1
val base = Base()
base.inlineFunBase {}
base.inlineGetterBase
base.inlineGetterBase = 1
a.inlineSetter
a.inlineSetter = 1
base.inlineSetterBase
base.inlineSetterBase = 1
a.allInline
a.allInline = 1
base.allInlineBase
base.allInlineBase = 1
}
class Derived : Base() {
fun test() {
inlineFunBase {}
inlineGetterBase
inlineGetterBase = 1
inlineSetterBase
inlineSetterBase = 1
allInlineBase
allInlineBase = 1
}
}