[NI] Run call checkers on resolved calls for callable references
#KT-34391 Fixed
This commit is contained in:
+2
@@ -311,6 +311,8 @@ class ResolvedAtomCompleter(
|
||||
topLevelCallContext.trace,
|
||||
callableReferenceExpression
|
||||
)
|
||||
|
||||
kotlinToResolvedCallTransformer.runCallCheckers(resolvedCall, topLevelCallCheckerContext)
|
||||
}
|
||||
|
||||
private fun completeCollectionLiteralCalls(collectionLiteralArgument: ResolvedCollectionLiteralAtom) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
fun main() {
|
||||
val list = listOf(A())
|
||||
list.forEach(A::<!EXPERIMENTAL_API_USAGE_ERROR!>foo<!>)
|
||||
list.forEach {
|
||||
it.<!EXPERIMENTAL_API_USAGE_ERROR!>foo<!>()
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
@ExperimentalTime
|
||||
fun foo() {
|
||||
println("a")
|
||||
}
|
||||
}
|
||||
|
||||
@<!EXPERIMENTAL_IS_NOT_ENABLED!>Experimental<!>(level = <!EXPERIMENTAL_IS_NOT_ENABLED!>Experimental<!>.Level.ERROR)
|
||||
annotation class ExperimentalTime
|
||||
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@ExperimentalTime public final fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.ERROR) public final annotation class ExperimentalTime : kotlin.Annotation {
|
||||
public constructor ExperimentalTime()
|
||||
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
@@ -3156,6 +3156,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt26806.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt34391.kt")
|
||||
public void testKt34391() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9345.kt")
|
||||
public void testKt9345() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt9345.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -3156,6 +3156,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt26806.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt34391.kt")
|
||||
public void testKt34391() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9345.kt")
|
||||
public void testKt9345() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt9345.kt");
|
||||
|
||||
Reference in New Issue
Block a user