[FIR] Add new test argParamTypeMismatch.kt for ARGUMENT_TYPE_MISMATCH diagnostics
This commit is contained in:
committed by
TeamCityServer
parent
a09b836334
commit
4ffab5fe5a
+5
@@ -496,6 +496,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("argParamTypeMismatch.kt")
|
||||||
|
public void testArgParamTypeMismatch() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("argumentsOfAnnotations.kt")
|
@TestMetadata("argumentsOfAnnotations.kt")
|
||||||
public void testArgumentsOfAnnotations() throws Exception {
|
public void testArgumentsOfAnnotations() throws Exception {
|
||||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfAnnotations.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfAnnotations.kt");
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
FILE: argParamTypeMismatch.kt
|
||||||
|
public final fun foo(first: R|kotlin/String|): R|kotlin/Unit| {
|
||||||
|
}
|
||||||
|
public final fun foo2(first: R|kotlin/String|, second: R|kotlin/Int|): R|kotlin/Unit| {
|
||||||
|
}
|
||||||
|
public final fun test(): R|kotlin/Unit| {
|
||||||
|
lval int: R|kotlin/Int| = Int(1)
|
||||||
|
<Inapplicable(INAPPLICABLE): /foo>#(R|<local>/int|)
|
||||||
|
<Inapplicable(INAPPLICABLE): /foo>#(Int(2))
|
||||||
|
<Inapplicable(INAPPLICABLE): /foo>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||||
|
^ Int(20)
|
||||||
|
}
|
||||||
|
))
|
||||||
|
R|/foo2|(String(asdf), Int(3))
|
||||||
|
<Inapplicable(INAPPLICABLE): /foo2>#(Int(4), String(asdf))
|
||||||
|
<Inapplicable(INAPPLICABLE): /foo2>#(Int(5), Int(6))
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
fun foo(first: String) {}
|
||||||
|
fun foo2(first: String, second: Int) {}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
val int = 1
|
||||||
|
foo(<!ARGUMENT_TYPE_MISMATCH!>int<!>)
|
||||||
|
foo(<!ARGUMENT_TYPE_MISMATCH!>2<!>)
|
||||||
|
foo(<!ARGUMENT_TYPE_MISMATCH!>run { 20 }<!>)
|
||||||
|
|
||||||
|
foo2("asdf", 3)
|
||||||
|
foo2(<!ARGUMENT_TYPE_MISMATCH!>4<!>, <!ARGUMENT_TYPE_MISMATCH!>"asdf"<!>)
|
||||||
|
foo2(<!ARGUMENT_TYPE_MISMATCH!>5<!>, 6)
|
||||||
|
}
|
||||||
+6
@@ -581,6 +581,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("argParamTypeMismatch.kt")
|
||||||
|
public void testArgParamTypeMismatch() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("argumentsOfAnnotations.kt")
|
@TestMetadata("argumentsOfAnnotations.kt")
|
||||||
public void testArgumentsOfAnnotations() throws Exception {
|
public void testArgumentsOfAnnotations() throws Exception {
|
||||||
|
|||||||
+6
@@ -585,6 +585,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("argParamTypeMismatch.kt")
|
||||||
|
public void testArgParamTypeMismatch() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("argumentsOfAnnotations.kt")
|
@TestMetadata("argumentsOfAnnotations.kt")
|
||||||
public void testArgumentsOfAnnotations() throws Exception {
|
public void testArgumentsOfAnnotations() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user