Add regression test for PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL diagnostic

#KT-20507
This commit is contained in:
Dmitriy Novozhilov
2019-03-21 16:09:46 +03:00
parent 42aa708f16
commit 58189c79ca
5 changed files with 66 additions and 0 deletions
@@ -0,0 +1,21 @@
// !WITH_NEW_INFERENCE
// FILE: GA.kt
package test.x
open class GA<T> protected constructor()
// FILE: Main.kt
package test
import test.x.GA
class C : GA<Any>() {
companion object {
fun bar() = <!PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>GA<!><Any>() // Should be error
}
}
fun main(args: Array<String>) {
C.bar()
}