FE: report DECLARATION_CANT_BE_INLINED at 'inline' modifier

#KT-44022 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-11-25 10:45:54 +03:00
parent 4df937ff7f
commit 2f1d415e4d
10 changed files with 111 additions and 42 deletions
@@ -14,17 +14,17 @@ abstract class A {
inline final fun good4() {}
<!DECLARATION_CANT_BE_INLINED!>inline open protected fun wrong1()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> open protected fun wrong1() {}
<!DECLARATION_CANT_BE_INLINED!>inline open public fun wrong2()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> open public fun wrong2() {}
<!DECLARATION_CANT_BE_INLINED!>inline open fun wrong3()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> open fun wrong3() {}
<!DECLARATION_CANT_BE_INLINED!>inline abstract protected fun wrong4()<!>
<!DECLARATION_CANT_BE_INLINED!>inline<!> abstract protected fun wrong4()
<!DECLARATION_CANT_BE_INLINED!>inline abstract public fun wrong5()<!>
<!DECLARATION_CANT_BE_INLINED!>inline<!> abstract public fun wrong5()
<!DECLARATION_CANT_BE_INLINED!>inline abstract fun wrong6()<!>
<!DECLARATION_CANT_BE_INLINED!>inline<!> abstract fun wrong6()
}
@@ -32,17 +32,17 @@ interface B {
inline private fun good1() {}
<!DECLARATION_CANT_BE_INLINED!>inline fun wrong1()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> fun wrong1() {}
<!DECLARATION_CANT_BE_INLINED!>inline open fun wrong2()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> open fun wrong2() {}
<!DECLARATION_CANT_BE_INLINED!>inline open public fun wrong3()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> open public fun wrong3() {}
<!DECLARATION_CANT_BE_INLINED!>inline open fun wrong4()<!> {}
<!DECLARATION_CANT_BE_INLINED!>inline<!> open fun wrong4() {}
<!DECLARATION_CANT_BE_INLINED!>inline fun wrong5()<!>
<!DECLARATION_CANT_BE_INLINED!>inline<!> fun wrong5()
<!DECLARATION_CANT_BE_INLINED!>inline public fun wrong6()<!>
<!DECLARATION_CANT_BE_INLINED!>inline<!> public fun wrong6()
<!DECLARATION_CANT_BE_INLINED!>inline fun wrong7()<!>
<!DECLARATION_CANT_BE_INLINED!>inline<!> fun wrong7()
}