// !WITH_NEW_INFERENCE // !DIAGNOSTICS: -UNUSED_PARAMETER // FILE: GA.kt package test.x open class GA protected constructor() // FILE: Main.kt package test import test.x.GA class C : GA() { companion object { fun bar() = GA() // Should be error } } fun main(args: Array) { C.bar() }