Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/protectedSuperCall.kt
T
2019-12-19 12:32:14 +01:00

22 lines
375 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// 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()
}