Introduce error for PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE

^KT-42972 Fixed
This commit is contained in:
Victor Petukhov
2021-09-22 12:15:06 +03:00
parent 01e853fb9b
commit 561ef5947a
11 changed files with 89 additions and 5 deletions
+1 -1
View File
@@ -5,5 +5,5 @@ open class Foo protected constructor()
inline fun foo(f: () -> Unit) = object: Foo() {}
class A : Foo() {
inline fun foo(f: () -> Unit) = <!PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE, PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>Foo<!>()
inline fun foo(f: () -> Unit) = <!PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE_ERROR, PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>Foo<!>()
}