Files
Pavel Kirpichenkov 2a46da906c Provide additional information about missing supertypes
Add -X flag to report extra compiler diagnostics which migth break compatibility.
Use the flag to unconditionally check constructors without fear of
prematurely evaluating lazy supertypes.

KT-19234
KT-42404
KT-44583
2021-02-08 18:47:30 +03:00

27 lines
582 B
Kotlin
Vendored

import test.Sub as MySub
import test.SubKt
typealias Sub = MySub
class Test<T>
@Suppress("UNUSED_PARAMETER")
fun useCallRef(ref: Any?) {}
@Suppress("UNUSED_PARAMETER")
fun simpleFun(arg: Sub): Sub = Sub()
inline fun <reified T> inlineFun(t: T) = t
// In conservative mode without -Xextended-compiler-checks flag these usages don't cause compilation error
fun test() {
@Suppress("UNUSED_VARIABLE")
val x: Sub = Sub()
Test<Sub>()
useCallRef(::Sub)
simpleFun(Sub())
inlineFun<Sub>(Sub())
SubKt.companionMethod()
SubKt.InnerObject.objectMethod()
}