[NI] Added test for KT-32094
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
// FILE: a.kt
|
||||
|
||||
package a
|
||||
|
||||
private class Queue {
|
||||
private companion object
|
||||
}
|
||||
|
||||
// FILE: b/Queue.java
|
||||
|
||||
package b;
|
||||
|
||||
public class Queue {
|
||||
public static Queue empty() { return null; }
|
||||
}
|
||||
|
||||
// FILE: c.kt
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
|
||||
package c
|
||||
|
||||
import a.*
|
||||
import b.Queue
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
interface Inv<T> {
|
||||
fun emit(e: T)
|
||||
}
|
||||
|
||||
fun <T> invBuilder(@BuilderInference block: Inv<T>.() -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
invBuilder {
|
||||
val q = <!NI;INVISIBLE_MEMBER!>Queue<!>.empty()
|
||||
emit(42)
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
|
||||
private final class Queue {
|
||||
public constructor Queue()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
private companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package b {
|
||||
|
||||
public open class Queue {
|
||||
public constructor Queue()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public open fun empty(): b.Queue!
|
||||
}
|
||||
}
|
||||
|
||||
package c {
|
||||
public fun </*0*/ T> invBuilder(/*0*/ @kotlin.BuilderInference block: c.Inv<T>.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public interface Inv</*0*/ T> {
|
||||
public abstract fun emit(/*0*/ e: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+5
@@ -1917,6 +1917,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("severalCandidatesWithDifferentVisibility.kt")
|
||||
public void testSeveralCandidatesWithDifferentVisibility() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/severalCandidatesWithDifferentVisibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleGenerator.kt")
|
||||
public void testSimpleGenerator() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/simpleGenerator.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -1917,6 +1917,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("severalCandidatesWithDifferentVisibility.kt")
|
||||
public void testSeveralCandidatesWithDifferentVisibility() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/severalCandidatesWithDifferentVisibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleGenerator.kt")
|
||||
public void testSimpleGenerator() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/simpleGenerator.kt");
|
||||
|
||||
Reference in New Issue
Block a user