Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.fir.kt
T
Dmitriy Novozhilov e6b5cb5216 [TD] Update diagnostics test data due to new test runners
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00

34 lines
868 B
Kotlin
Vendored

//!DIAGNOSTICS: -UNUSED_PARAMETER
// !WITH_NEW_INFERENCE
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <T> test1(t1: T, t2: @kotlin.internal.NoInfer T): T = t1
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <T> @kotlin.internal.NoInfer T.test2(t1: T): T = t1
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <T> test3(t1: @kotlin.internal.NoInfer T): T = t1
fun usage() {
test1(1, "312")
1.test2("")
test3("")
}
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <T> List<T>.contains1(e: @kotlin.internal.NoInfer T): Boolean = true
fun test(i: Int?, a: Any, l: List<Int>) {
l.contains1(a)
l.contains1("")
l.contains1(i)
}
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <T> assertEquals1(e1: T, e2: @kotlin.internal.NoInfer T): Boolean = true
fun test(s: String) {
assertEquals1(s, 11)
}