Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/protectedSuperCall.kt
T
2019-03-21 16:09:46 +03:00

21 lines
340 B
Kotlin
Vendored

// !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()
}