KT-11111:

- override by a final inline fun is a warning
- override by a fun with reified type parameters is an error
This commit is contained in:
Dmitry Petrov
2016-04-19 11:58:04 +03:00
parent ef0f512201
commit 420c7a0285
8 changed files with 109 additions and 13 deletions
@@ -13,11 +13,11 @@ 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()<!>
@@ -31,13 +31,13 @@ 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()<!>