Minor: add test for suppressed error.

This commit is contained in:
Dmitry Petrov
2016-09-13 11:14:21 +03:00
committed by Dmitry Petrov
parent 3fa33b5969
commit c4391ebce5
3 changed files with 27 additions and 0 deletions
@@ -0,0 +1,9 @@
class C {
internal fun bar() {}
}
inline fun C.foo() {
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
bar()
}
@@ -0,0 +1,12 @@
FILE /suppressedNonPublicCall.kt
CLASS CLASS C
CONSTRUCTOR public constructor C()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='C'
FUN internal final fun bar(): kotlin.Unit
BLOCK_BODY
FUN public inline fun C.foo(): kotlin.Unit
BLOCK_BODY
CALL 'bar(): Unit' type=kotlin.Unit operator=null
$this: $RECEIVER of 'foo() on C: Unit' type=C
@@ -253,6 +253,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("suppressedNonPublicCall.kt")
public void testSuppressedNonPublicCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt");
doTest(fileName);
}
@TestMetadata("unresolvedReference.kt")
public void testUnresolvedReference() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/errors/unresolvedReference.kt");