Drop annotations deprecation related things: diagnostics, quickfixes
This commit is contained in:
@@ -140,11 +140,6 @@ public interface Errors {
|
||||
DiagnosticFactory0<PsiElement> INAPPLICABLE_PARAM_TARGET = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory1<PsiElement, String> REDUNDANT_ANNOTATION_TARGET = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
DiagnosticFactory0<JetAnnotationEntry> DEPRECATED_UNESCAPED_ANNOTATION = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory0<PsiElement> DEPRECATED_ESCAPED_MODIFIER = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory1<JetAnnotationEntry, String> DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER = DiagnosticFactory1.create(WARNING);
|
||||
DiagnosticFactory0<JetAnnotationEntry> DEPRECATED_ANNOTATION_USE = DiagnosticFactory0.create(WARNING);
|
||||
|
||||
// Classes and traits
|
||||
|
||||
DiagnosticFactory0<JetTypeProjection> PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE =
|
||||
@@ -223,7 +218,6 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactory1<PsiElement, DeclarationDescriptor> DEPRECATED_SYMBOL = DiagnosticFactory1.create(WARNING);
|
||||
DiagnosticFactory2<PsiElement, DeclarationDescriptor, String> DEPRECATED_SYMBOL_WITH_MESSAGE = DiagnosticFactory2.create(WARNING);
|
||||
DiagnosticFactory1<JetSimpleNameExpression, ClassDescriptor> DEPRECATED_DECAPITALIZED_ANNOTATION = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
// Objects
|
||||
|
||||
|
||||
-6
@@ -132,11 +132,6 @@ public class DefaultErrorMessages {
|
||||
MAP.put(INAPPLICABLE_PARAM_TARGET, "''@param:'' annotations could be applied only to primary constructor parameters");
|
||||
MAP.put(REDUNDANT_ANNOTATION_TARGET, "Redundant annotation target ''{0}''", STRING);
|
||||
|
||||
MAP.put(DEPRECATED_UNESCAPED_ANNOTATION, "Annotations without '@' are deprecated now");
|
||||
MAP.put(DEPRECATED_ESCAPED_MODIFIER, "Modifiers with '@' are deprecated now");
|
||||
MAP.put(DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER, "This annotation will become a modifier soon. Use ''{0}'' modifier instead", STRING);
|
||||
MAP.put(DEPRECATED_ANNOTATION_USE, "This annotation use is deprecated");
|
||||
|
||||
MAP.put(REDUNDANT_MODIFIER, "Modifier ''{0}'' is redundant because ''{1}'' is present", TO_STRING, TO_STRING);
|
||||
MAP.put(ABSTRACT_MODIFIER_IN_TRAIT, "Modifier ''abstract'' is redundant in interface");
|
||||
MAP.put(REDUNDANT_MODIFIER_IN_GETTER, "Visibility modifiers are redundant in getter");
|
||||
@@ -274,7 +269,6 @@ public class DefaultErrorMessages {
|
||||
|
||||
MAP.put(DEPRECATED_SYMBOL, "''{0}'' is deprecated.", DEPRECATION_RENDERER);
|
||||
MAP.put(DEPRECATED_SYMBOL_WITH_MESSAGE, "''{0}'' is deprecated. {1}", DEPRECATION_RENDERER, STRING);
|
||||
MAP.put(DEPRECATED_DECAPITALIZED_ANNOTATION, "Decapitalized annotations are deprecated. Use ''{0}'' instead", DEPRECATION_RENDERER);
|
||||
|
||||
MAP.put(LOCAL_OBJECT_NOT_ALLOWED, "Named object ''{0}'' is a singleton and cannot be local. Try to use anonymous object instead", NAME);
|
||||
MAP.put(ENUM_CLASS_CONSTRUCTOR_CALL, "Enum types cannot be instantiated");
|
||||
|
||||
@@ -108,12 +108,6 @@ public class JetAnnotationEntry extends JetElementImplStub<KotlinAnnotationEntry
|
||||
return findChildByType(JetTokens.AT);
|
||||
}
|
||||
|
||||
public boolean hasAtSymbolOrInList() {
|
||||
if (getStub() != null) return true;
|
||||
|
||||
return getAtSymbol() != null || getParent() instanceof JetAnnotation;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public JetAnnotationUseSiteTarget getUseSiteTarget() {
|
||||
JetAnnotationUseSiteTarget target = getStubOrPsiChild(JetStubElementTypes.ANNOTATION_TARGET);
|
||||
|
||||
@@ -70,20 +70,6 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
val descriptor = trace.get(BindingContext.ANNOTATION, entry) ?: continue
|
||||
val classDescriptor = TypeUtils.getClassDescriptor(descriptor.type) ?: continue
|
||||
|
||||
if (classDescriptor.fqNameSafe in ANNOTATIONS_SHOULD_BE_REPLACED_WITH_MODIFIERS_FQ_NAMES) {
|
||||
if (descriptor.isInlineOptionsWithLocalBreaks()) {
|
||||
trace.report(Errors.DEPRECATED_ANNOTATION_USE.on(entry))
|
||||
}
|
||||
else {
|
||||
trace.report(Errors.DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER.on(entry, ANNOTATION_MODIFIERS_MAP[classDescriptor.fqNameSafe]!!))
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!entry.hasAtSymbolOrInList()) {
|
||||
trace.report(Errors.DEPRECATED_UNESCAPED_ANNOTATION.on(entry))
|
||||
}
|
||||
}
|
||||
|
||||
val useSiteTarget = entry.useSiteTarget?.getAnnotationUseSiteTarget()
|
||||
val existingTargetsForAnnotation = entryTypesWithAnnotations.getOrPut(descriptor.type) { arrayListOf() }
|
||||
val duplicateAnnotation = useSiteTarget in existingTargetsForAnnotation
|
||||
@@ -98,21 +84,6 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
additionalCheckers.forEach { it.checkEntries(entries, actualTargets.defaultTargets, trace) }
|
||||
}
|
||||
|
||||
private fun AnnotationDescriptor.isInlineOptionsWithLocalBreaks(): Boolean {
|
||||
val descriptor = type.constructor.declarationDescriptor
|
||||
if (descriptor !is ClassDescriptor) return false
|
||||
|
||||
if (descriptor.fqNameSafe == KotlinBuiltIns.FQ_NAMES.inlineOptions) {
|
||||
val vararg = (allValueArguments.values().firstOrNull() as? ArrayValue)?.value ?: return false
|
||||
return vararg.all {
|
||||
arg ->
|
||||
val enumValue = (arg as? EnumValue) ?: return false
|
||||
return enumValue.value.name.asString() == InlineOption.LOCAL_CONTINUE_AND_BREAK.name()
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private fun checkAnnotationEntry(entry: JetAnnotationEntry, actualTargets: TargetList, trace: BindingTrace) {
|
||||
val applicableTargets = applicableTargetSet(entry, trace)
|
||||
val useSiteTarget = entry.useSiteTarget?.getAnnotationUseSiteTarget()
|
||||
|
||||
@@ -204,9 +204,6 @@ public object ModifierCheckerCore {
|
||||
else if (!checkParent(trace, second, parentDescriptor)) {
|
||||
incorrectNodes += second
|
||||
}
|
||||
else if ((second.elementType is JetModifierKeywordToken) && second.psi.textContains('@')) {
|
||||
trace.report(Errors.DEPRECATED_ESCAPED_MODIFIER.on(second.psi))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-33
@@ -33,10 +33,6 @@ import org.jetbrains.kotlin.resolve.annotations.argumentValue
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget.PROPERTY_GETTER
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget.PROPERTY_SETTER
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe
|
||||
import org.jetbrains.kotlin.resolve.scopes.DECAPITALIZED_DEPRECATED_ANNOTATIONS
|
||||
import org.jetbrains.kotlin.resolve.scopes.DECAPITALIZED_SHORT_NAMES
|
||||
|
||||
public class DeprecatedSymbolValidator : SymbolUsageValidator {
|
||||
private val JAVA_DEPRECATED = FqName(java.lang.Deprecated::class.java.name)
|
||||
@@ -50,9 +46,6 @@ public class DeprecatedSymbolValidator : SymbolUsageValidator {
|
||||
else if (targetDescriptor is PropertyDescriptor) {
|
||||
propertyGetterWorkaround(targetDescriptor, trace, element)
|
||||
}
|
||||
else {
|
||||
checkDecapitalizedAnnotation(element, targetDescriptor, trace)
|
||||
}
|
||||
}
|
||||
|
||||
override fun validateTypeUsage(targetDescriptor: ClassifierDescriptor, trace: BindingTrace, element: PsiElement) {
|
||||
@@ -71,32 +64,6 @@ public class DeprecatedSymbolValidator : SymbolUsageValidator {
|
||||
val (annotation, target) = deprecated
|
||||
trace.report(createDeprecationDiagnostic(element, target, annotation))
|
||||
}
|
||||
else {
|
||||
checkDecapitalizedAnnotation(element, targetDescriptor, trace)
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkDecapitalizedAnnotation(element: PsiElement, targetDescriptor: DeclarationDescriptor, trace: BindingTrace) {
|
||||
val effectiveTargetDescriptor = when (targetDescriptor) {
|
||||
is ConstructorDescriptor -> targetDescriptor.containingDeclaration
|
||||
else -> targetDescriptor
|
||||
} as? ClassDescriptor ?: return
|
||||
|
||||
val unsafeFqName = effectiveTargetDescriptor.fqNameUnsafe
|
||||
if (!unsafeFqName.isSafe) return
|
||||
|
||||
val simpleName = unwrapSimpleName(element) ?: return
|
||||
if (unsafeFqName.toSafe() in DECAPITALIZED_DEPRECATED_ANNOTATIONS && simpleName.getReferencedName() in DECAPITALIZED_SHORT_NAMES) {
|
||||
trace.report(Errors.DEPRECATED_DECAPITALIZED_ANNOTATION.on(simpleName, effectiveTargetDescriptor))
|
||||
}
|
||||
}
|
||||
|
||||
private fun unwrapSimpleName(element: PsiElement): JetSimpleNameExpression? {
|
||||
return when (element) {
|
||||
is JetConstructorCalleeExpression -> (element.typeReference?.typeElement as? JetUserType)?.referenceExpression
|
||||
is JetSimpleNameExpression -> element
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
private fun DeclarationDescriptor.getDeprecatedAnnotation(): Pair<AnnotationDescriptor, DeclarationDescriptor>? {
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -NOT_YET_SUPPORTED_IN_INLINE
|
||||
import kotlin.external as myNative
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@annotation<!> <!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@data<!> <!DEPRECATED_ESCAPED_MODIFIER!>@public<!> class Ann(val arg: Int = 1)
|
||||
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inline<!> <!DEPRECATED_ESCAPED_MODIFIER!>@private<!> fun bar(block: () -> Int) = block()
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@data<!> class Q(val x: Int, val y: Int)
|
||||
|
||||
fun bar2(): Array<Q> = null!!
|
||||
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@open<!> class A <!DEPRECATED_ESCAPED_MODIFIER!>@private<!> constructor(<!DEPRECATED_ESCAPED_MODIFIER!>@private<!> val prop: Int) {
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@private<!> val x = 1
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inline<!> fun foo(<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@noinline<!> x: Int) {
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@data<!> class Local
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inline<!> fun localFun() {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@private<!> object O1 {}
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@public<!> <!DEPRECATED_ESCAPED_MODIFIER!>@companion<!> object O2 {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>kotlin.inline<!> fun baz() { }
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>kotlin.data<!> class Data
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>myNative<!> fun nativeFun(): Int
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@tailRecursive<!> fun tailFun(): Int = tailFun()
|
||||
|
||||
inline fun inlineFun(<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inlineOptions(InlineOption.ONLY_LOCAL_RETURN)<!> block: () -> Int) {}
|
||||
inline fun inlineFun2(<!DEPRECATED_ANNOTATION_USE!>@inlineOptions(InlineOption.LOCAL_CONTINUE_AND_BREAK)<!> block: () -> Int) {}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
package
|
||||
|
||||
kotlin.inline() private fun bar(/*0*/ block: () -> kotlin.Int): kotlin.Int
|
||||
public fun bar2(): kotlin.Array<Q>
|
||||
kotlin.inline() public fun baz(): kotlin.Unit
|
||||
kotlin.inline() public fun inlineFun(/*0*/ kotlin.inlineOptions(value = {InlineOption.ONLY_LOCAL_RETURN}) block: () -> kotlin.Int): kotlin.Unit
|
||||
kotlin.inline() public fun inlineFun2(/*0*/ kotlin.inlineOptions(value = {InlineOption.LOCAL_CONTINUE_AND_BREAK}) block: () -> kotlin.Int): kotlin.Unit
|
||||
kotlin.external() public fun nativeFun(): kotlin.Int
|
||||
kotlin.tailRecursive() public fun tailFun(): kotlin.Int
|
||||
|
||||
public open class A {
|
||||
private constructor A(/*0*/ prop: kotlin.Int)
|
||||
private final val prop: kotlin.Int
|
||||
private final val x: kotlin.Int = 1
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
kotlin.inline() public final fun foo(/*0*/ kotlin.noinline() x: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
private object O1 {
|
||||
private constructor O1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object O2 {
|
||||
private constructor O2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() kotlin.data() public final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ arg: kotlin.Int = ...)
|
||||
public final val arg: kotlin.Int
|
||||
public final /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ arg: kotlin.Int = ...): Ann
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.data() public final class Data {
|
||||
public constructor Data()
|
||||
public final /*synthesized*/ fun copy(): Data
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.data() public final class Q {
|
||||
public constructor Q(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public final val y: kotlin.Int
|
||||
public final /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final /*synthesized*/ fun component2(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Int = ...): Q
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
annotation class Ann(val arg: Int = 1)
|
||||
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> class A <!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> constructor(<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> val prop: Int) {
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> val x = 1
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> fun foo(<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> x: Int) {}
|
||||
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> object O1 {}
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> companion object O2 {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> object O3 {}
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
package
|
||||
|
||||
Ann() public final class A {
|
||||
Ann() public constructor A(/*0*/ Ann() prop: kotlin.Int)
|
||||
public final val prop: kotlin.Int
|
||||
Ann() public final val x: kotlin.Int = 1
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
Ann() public final fun foo(/*0*/ Ann() x: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
Ann() public object O1 {
|
||||
private constructor O1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Ann() public companion object O2 {
|
||||
private constructor O2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() public final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ arg: kotlin.Int = ...)
|
||||
public final val arg: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Ann() public object O3 {
|
||||
private constructor O3()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// !DIAGNOSTICS: -DEPRECATED_UNESCAPED_ANNOTATION -UNUSED_PARAMETER
|
||||
import kotlin.Extension as extension
|
||||
import kotlin.jvm.<!DEPRECATED_DECAPITALIZED_ANNOTATION!>strictfp<!> as sfp
|
||||
class A {
|
||||
@<!DEPRECATED_DECAPITALIZED_ANNOTATION!>deprecated<!>("") fun foo() {}
|
||||
companion object {
|
||||
@<!DEPRECATED_DECAPITALIZED_ANNOTATION!>jvmStatic<!> fun bar() {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_SYMBOL_WITH_MESSAGE!>throws<!>(java.lang.RuntimeException::class)
|
||||
<!DEPRECATED_DECAPITALIZED_ANNOTATION!>synchronized<!> fun <T> baz() {
|
||||
@<!DEPRECATED_DECAPITALIZED_ANNOTATION!>suppress<!>("UNCHECKED_CAST")
|
||||
(1 as T)
|
||||
}
|
||||
|
||||
kotlin.jvm.<!DEPRECATED_DECAPITALIZED_ANNOTATION!>jvmName<!>("y")
|
||||
<!DEPRECATED_DECAPITALIZED_ANNOTATION!>jvmOverloads<!>()
|
||||
fun x(x: Int = 1) {}
|
||||
}
|
||||
|
||||
sfp fun bar(
|
||||
x: <!DEPRECATED_DECAPITALIZED_ANNOTATION!>deprecated<!>
|
||||
): @<!DEPRECATED_DECAPITALIZED_ANNOTATION!>extension<!> String.() -> Int = null!!
|
||||
@@ -1,21 +0,0 @@
|
||||
package
|
||||
|
||||
kotlin.jvm.Strictfp() public fun bar(/*0*/ x: kotlin.Deprecated): @[kotlin.Extension()] kotlin.String.() -> kotlin.Int
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
kotlin.throws(exceptionClasses = {java.lang.RuntimeException::class}) kotlin.jvm.Synchronized() public final fun </*0*/ T> baz(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
kotlin.Deprecated(value = "") public final fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
kotlin.jvm.JvmName(name = "y") kotlin.jvm.JvmOverloads() public final fun x(/*0*/ x: kotlin.Int = ...): kotlin.Unit
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
kotlin.jvm.JvmStatic() public final fun bar(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -1002,27 +1002,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/annotations/migration")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Migration extends AbstractJetDiagnosticsTest {
|
||||
public void testAllFilesPresentInMigration() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/migration"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("escapedModifiers.kt")
|
||||
public void testEscapedModifiers() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/migration/escapedModifiers.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("unescapedAnnotation.kt")
|
||||
public void testUnescapedAnnotation() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/migration/unescapedAnnotation.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/annotations/options")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
-6
@@ -91,12 +91,6 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("decapitalized.kt")
|
||||
public void testDecapitalized() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/decapitalized.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("defaultValueMustBeConstant.kt")
|
||||
public void testDefaultValueMustBeConstant() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.kt");
|
||||
|
||||
Reference in New Issue
Block a user