Do not render @NoInfer, @Exact annotations
For now they are always not rendered, but later they should be rendered in descriptors, but omitted in error messages
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package
|
package
|
||||||
|
|
||||||
public fun test1(/*0*/ l: kotlin.List<kotlin.Number>): kotlin.Unit
|
public fun test1(/*0*/ l: kotlin.List<kotlin.Number>): kotlin.Unit
|
||||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T, /*1*/ U : T> kotlin.List<@kotlin.Exact() T>.firstTyped(): U
|
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T, /*1*/ U : T> kotlin.List<T>.firstTyped(): U
|
||||||
|
|||||||
Vendored
+5
-5
@@ -1,10 +1,10 @@
|
|||||||
package
|
package
|
||||||
|
|
||||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> assertEquals1(/*0*/ e1: T, /*1*/ e2: @kotlin.NoInfer() T): kotlin.Boolean
|
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> assertEquals1(/*0*/ e1: T, /*1*/ e2: T): kotlin.Boolean
|
||||||
public fun test(/*0*/ l: kotlin.List<kotlin.Number>): kotlin.Unit
|
public fun test(/*0*/ l: kotlin.List<kotlin.Number>): kotlin.Unit
|
||||||
public fun test(/*0*/ s: kotlin.String): kotlin.Unit
|
public fun test(/*0*/ s: kotlin.String): kotlin.Unit
|
||||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> test1(/*0*/ t1: T, /*1*/ t2: @kotlin.NoInfer() T): T
|
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> test1(/*0*/ t1: T, /*1*/ t2: T): T
|
||||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> test3(/*0*/ t1: @kotlin.NoInfer() T): T
|
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> test3(/*0*/ t1: T): T
|
||||||
public fun usage(): kotlin.Unit
|
public fun usage(): kotlin.Unit
|
||||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> kotlin.List<T>.contains1(/*0*/ e: @kotlin.NoInfer() T): kotlin.Boolean
|
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> kotlin.List<T>.contains1(/*0*/ e: T): kotlin.Boolean
|
||||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> @kotlin.NoInfer() T.test2(/*0*/ t1: T): T
|
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> T.test2(/*0*/ t1: T): T
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ internal class DescriptorRendererOptionsImpl : DescriptorRendererOptions {
|
|||||||
FqName("org.jetbrains.annotations.ReadOnly"),
|
FqName("org.jetbrains.annotations.ReadOnly"),
|
||||||
FqName("org.jetbrains.annotations.Mutable"),
|
FqName("org.jetbrains.annotations.Mutable"),
|
||||||
FqName("org.jetbrains.annotations.NotNull"),
|
FqName("org.jetbrains.annotations.NotNull"),
|
||||||
FqName("org.jetbrains.annotations.Nullable")
|
FqName("org.jetbrains.annotations.Nullable"),
|
||||||
|
FqName("kotlin.internal.NoInfer"),
|
||||||
|
FqName("kotlin.internal.Exact")
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// !DIAGNOSTICS_NUMBER: 1
|
||||||
|
// !DIAGNOSTICS: TYPE_MISMATCH
|
||||||
|
// !MESSAGE_TYPE: TEXT
|
||||||
|
|
||||||
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
|
fun <T> test1(t1: T, t2: @kotlin.internal.NoInfer T): T = t1
|
||||||
|
|
||||||
|
fun usage() {
|
||||||
|
test1(1, "a")
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<!-- annotationsForResolve1 -->
|
||||||
|
Type mismatch: inferred type is kotlin.String but kotlin.Int was expected
|
||||||
@@ -64,7 +64,7 @@ public abstract class AbstractDiagnosticMessageTest extends JetLiteFixture {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
protected KotlinCoreEnvironment createEnvironment() {
|
protected KotlinCoreEnvironment createEnvironment() {
|
||||||
return createEnvironmentWithMockJdk(ConfigurationKind.JDK_ONLY);
|
return createEnvironmentWithMockJdk(ConfigurationKind.ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ public class DiagnosticMessageTestGenerated extends AbstractDiagnosticMessageTes
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/diagnosticMessage"), Pattern.compile("^(.+)\\.kt$"), false);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/diagnosticMessage"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotationsForResolve.kt")
|
||||||
|
public void testAnnotationsForResolve() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/diagnosticMessage/annotationsForResolve.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("assignedButNeverAccessedVariable.kt")
|
@TestMetadata("assignedButNeverAccessedVariable.kt")
|
||||||
public void testAssignedButNeverAccessedVariable() throws Exception {
|
public void testAssignedButNeverAccessedVariable() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user