From 60fcdeb5ee31fcc24dfd439313c0f292aa52d088 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 24 Jan 2017 14:59:53 +0300 Subject: [PATCH] Test added: suppress on function reference #KT-15839 Obsolete --- .../annotationApplicability/suppressOnFunctionReference.kt | 3 +++ .../annotationApplicability/suppressOnFunctionReference.txt | 3 +++ .../kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt create mode 100644 compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.txt diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt new file mode 100644 index 00000000000..af68bbfb0a9 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt @@ -0,0 +1,3 @@ +// See KT-15839 + +val x = "1".let(@Suppress("DEPRECATION") Integer::parseInt) \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.txt new file mode 100644 index 00000000000..6deece5fc63 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.txt @@ -0,0 +1,3 @@ +package + +public val x: kotlin.Int diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index a2535956851..dd22ca3296c 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -267,6 +267,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPartWithJavaAnnotation.kt"); doTest(fileName); } + + @TestMetadata("suppressOnFunctionReference.kt") + public void testSuppressOnFunctionReference() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt"); + doTest(fileName); + } } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant")