Test for obsolete KT-4869: Report error when inline parameter is passed to a function variable

#KT-4869 Obsolete
This commit is contained in:
Michael Bogdanov
2015-05-19 15:43:54 +03:00
parent 319c5aec60
commit 4abaa54d0e
3 changed files with 15 additions and 0 deletions
@@ -0,0 +1,6 @@
inline fun foo(f: () -> Unit) {
val ff = { f: () -> Unit ->
}
ff(<!USAGE_IS_NOT_INLINABLE!>f<!>)
}
@@ -0,0 +1,3 @@
package
kotlin.inline() internal fun foo(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
@@ -6624,6 +6624,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("kt4869.kt")
public void testKt4869() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt4869.kt");
doTest(fileName);
}
@TestMetadata("labeled.kt")
public void testLabeled() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/labeled.kt");