mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] K2: align rendering of texts for members to override with K1 and update testdata
Currently, the only inconsistencies between K1 and K2 left are: - in K2 method type arguments are rendered - in K2 denotable types are rendered (they match the types that are generated when the method is chosen) - in K2 receiver parameters are rendered - the names of synthesized parameters ^KTIJ-30739 Fixed GitOrigin-RevId: 6aad4719b5bd7d40efaba8eb1fe10a57b8f9fdb1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ccfe306eaf
commit
d2e2407a52
+19
-1
@@ -20,9 +20,14 @@ import org.jetbrains.kotlin.analysis.api.permissions.KaAllowAnalysisFromWriteAct
|
||||
import org.jetbrains.kotlin.analysis.api.permissions.KaAllowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.analysis.api.permissions.allowAnalysisFromWriteAction
|
||||
import org.jetbrains.kotlin.analysis.api.permissions.allowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.base.KaKeywordsRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.base.annotations.KaRendererAnnotationsFilter
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.KaCallableReturnTypeFilter
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.bodies.KaParameterDefaultValueRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.impl.KaDeclarationRendererForSource
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.modifiers.renderers.KaRendererKeywordFilter
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.renderers.callables.KaPropertyAccessorsRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KaExpandedTypeRenderingMode
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KaCallableSymbol
|
||||
import org.jetbrains.kotlin.idea.base.analysis.api.utils.invokeShortening
|
||||
import org.jetbrains.kotlin.idea.core.insertMembersAfter
|
||||
@@ -298,6 +303,7 @@ private fun getMembersOrderedByRelativePositionsInSuperTypes(
|
||||
updateBatch()
|
||||
currentAnchor = entry.psi
|
||||
}
|
||||
|
||||
is MemberEntry.NewEntry -> {
|
||||
currentBatch += entry.psi
|
||||
}
|
||||
@@ -356,12 +362,24 @@ private fun getMembersOrderedByRelativePositionsInSuperTypes(
|
||||
companion object {
|
||||
@KaExperimentalApi
|
||||
val renderer = KaDeclarationRendererForSource.WITH_SHORT_NAMES.with {
|
||||
keywordsRenderer = KaKeywordsRenderer.NONE
|
||||
|
||||
returnTypeFilter = KaCallableReturnTypeFilter.ALWAYS
|
||||
|
||||
parameterDefaultValueRenderer = KaParameterDefaultValueRenderer.THREE_DOTS
|
||||
|
||||
typeRenderer = typeRenderer.with {
|
||||
expandedTypeRenderingMode = KaExpandedTypeRenderingMode.RENDER_ABBREVIATED_TYPE_WITH_EXPANDED_TYPE_COMMENT
|
||||
}
|
||||
annotationRenderer = annotationRenderer.with {
|
||||
annotationFilter = KaRendererAnnotationsFilter.NONE
|
||||
}
|
||||
modifiersRenderer = modifiersRenderer.with {
|
||||
keywordsRenderer = keywordsRenderer.with { keywordFilter = KaRendererKeywordFilter.onlyWith(KtTokens.OVERRIDE_KEYWORD) }
|
||||
keywordsRenderer = keywordsRenderer.with {
|
||||
keywordFilter = KaRendererKeywordFilter.onlyWith(KtTokens.VARARG_KEYWORD)
|
||||
}
|
||||
}
|
||||
propertyAccessorsRenderer = KaPropertyAccessorsRenderer.NONE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -251,8 +251,10 @@ abstract class AbstractOverrideImplementTest<T : ClassMember> : KotlinLightCodeI
|
||||
|
||||
val testFile = File(testDataDirectory, "$fileNameWithoutExtension.kt")
|
||||
|
||||
val frontendDependentDirective = if (isFirPlugin) MEMBER_K2_DIRECTIVE_PREFIX else MEMBER_K1_DIRECTIVE_PREFIX
|
||||
val actualMemberTexts = chooserObjects.map { it.text }.toLinkedSet()
|
||||
val expectedMemberTexts = InTextDirectivesUtils.findListWithPrefixes(testFile.readText(), MEMBER_DIRECTIVE_PREFIX).toLinkedSet()
|
||||
val expectedMemberTexts = InTextDirectivesUtils.findListWithPrefixes(testFile.readText(), MEMBER_DIRECTIVE_PREFIX).toLinkedSet() +
|
||||
InTextDirectivesUtils.findListWithPrefixes(testFile.readText(), frontendDependentDirective)
|
||||
|
||||
if (addMissingDirectives) {
|
||||
actualMemberTexts
|
||||
@@ -289,5 +291,7 @@ abstract class AbstractOverrideImplementTest<T : ClassMember> : KotlinLightCodeI
|
||||
companion object {
|
||||
protected const val MEMBER_TEXT = "MEMBER"
|
||||
protected const val MEMBER_DIRECTIVE_PREFIX = "// $MEMBER_TEXT:"
|
||||
protected const val MEMBER_K1_DIRECTIVE_PREFIX = "// ${MEMBER_TEXT}_K1:"
|
||||
protected const val MEMBER_K2_DIRECTIVE_PREFIX = "// ${MEMBER_TEXT}_K2:"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -8,4 +8,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s1: String!, s2: String!): String!"
|
||||
// MEMBER_K2: "foo(s1: String, s2: String?): String"
|
||||
// MEMBER_K1: "foo(s1: String!, s2: String!): String!"
|
||||
+2
-1
@@ -10,4 +10,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s1: String!, s2: String!): String!"
|
||||
// MEMBER_K2: "foo(s1: String, s2: String?): String"
|
||||
// MEMBER_K1: "foo(s1: String!, s2: String!): String!"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class InterfaceImpl : Interface {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Unit where B : Cloneable, B : Comparable<B>"
|
||||
// MEMBER_K2: "<A, B, E : Map.Entry<A, B>> foo(): Unit B : Runnable, B : Cloneable, B : Comparable<B>"
|
||||
// MEMBER_K1: "foo(): Unit where B : Cloneable, B : Comparable<B>"
|
||||
+2
-1
@@ -8,4 +8,5 @@ class InterfaceImpl : Interface {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Unit where B : Cloneable, B : Comparable<B>"
|
||||
// MEMBER_K2: "<A, B, E : Map.Entry<A, B>> foo(): Unit B : Runnable, B : Cloneable, B : Comparable<B>"
|
||||
// MEMBER_K1: "foo(): Unit where B : Cloneable, B : Comparable<B>"
|
||||
+2
-1
@@ -8,4 +8,5 @@ class InterfaceImpl : Interface {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Unit where B : Cloneable, B : Comparable<B>"
|
||||
// MEMBER_K2: "<A, B, E : Map.Entry<A, B>> foo(): Unit B : Runnable, B : Cloneable, B : Comparable<B>"
|
||||
// MEMBER_K1: "foo(): Unit where B : Cloneable, B : Comparable<B>"
|
||||
@@ -14,5 +14,6 @@ class <caret>C : I<Int> {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "a(t: Int, u: U): Unit"
|
||||
// MEMBER_K2: "<U> a(t: Int, u: U): Unit"
|
||||
// MEMBER_K1: "a(t: Int, u: U): Unit"
|
||||
// MEMBER: "c(t: Int): Unit"
|
||||
+2
-1
@@ -22,5 +22,6 @@ class C : I<Int> {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "a(t: Int, u: U): Unit"
|
||||
// MEMBER_K2: "<U> a(t: Int, u: U): Unit"
|
||||
// MEMBER_K1: "a(t: Int, u: U): Unit"
|
||||
// MEMBER: "c(t: Int): Unit"
|
||||
+50
-24
@@ -3,38 +3,64 @@ abstract class X : java.util.ArrayList<String>(), Runnable {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "add(element: String): Boolean"
|
||||
// MEMBER: "add(index: Int, element: String): Unit"
|
||||
// MEMBER: "addAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "addAll(index: Int, elements: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "add(p0: String): Boolean"
|
||||
// MEMBER_K2: "add(p0: Int, p1: String): Unit"
|
||||
// MEMBER_K2: "addAll(p0: Collection<out String>): Boolean"
|
||||
// MEMBER_K2: "addAll(p0: Int, p1: Collection<out String>): Boolean"
|
||||
// MEMBER_K2: "remove(p0: String): Boolean"
|
||||
// MEMBER_K2: "removeAll(p0: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "retainAll(p0: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "contains(p0: String): Boolean"
|
||||
// MEMBER_K2: "containsAll(p0: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "forEach(p0: Consumer<in String>?): Unit"
|
||||
// MEMBER_K2: "spliterator(): Spliterator<String?>"
|
||||
// MEMBER_K2: "toArray(): Array<out Any?>"
|
||||
// MEMBER_K2: "<T : Any?> toArray(p0: Array<out T?>): Array<out T?>"
|
||||
// MEMBER_K2: "removeIf(p0: Predicate<in String>): Boolean"
|
||||
// MEMBER_K2: "stream(): Stream<String?>"
|
||||
// MEMBER_K2: "parallelStream(): Stream<String?>"
|
||||
// MEMBER_K2: "equals(p0: Any?): Boolean"
|
||||
// MEMBER_K2: "listIterator(p0: Int): MutableListIterator<String>"
|
||||
// MEMBER_K2: "set(p0: Int, p1: String): String"
|
||||
// MEMBER_K2: "subList(p0: Int, p1: Int): MutableList<String>"
|
||||
// MEMBER_K2: "get(p0: Int): String"
|
||||
// MEMBER_K2: "indexOf(p0: String): Int"
|
||||
// MEMBER_K2: "lastIndexOf(p0: String): Int"
|
||||
// MEMBER_K2: "sort(p0: Comparator<in String>?): Unit"
|
||||
|
||||
// MEMBER_K1: "add(element: String): Boolean"
|
||||
// MEMBER_K1: "add(index: Int, element: String): Unit"
|
||||
// MEMBER_K1: "addAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "addAll(index: Int, elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "remove(element: String): Boolean"
|
||||
// MEMBER_K1: "removeAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "retainAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "contains(element: String): Boolean"
|
||||
// MEMBER_K1: "containsAll(elements: Collection<String!>): Boolean"
|
||||
// MEMBER_K1: "forEach(p0: Consumer<in String!>!): Unit"
|
||||
// MEMBER_K1: "spliterator(): Spliterator<String!>"
|
||||
// MEMBER_K1: "toArray(): Array<(out) Any!>!"
|
||||
// MEMBER_K1: "toArray(p0: Array<(out) T!>!): Array<(out) T!>!"
|
||||
// MEMBER_K1: "removeIf(p0: Predicate<in String>): Boolean"
|
||||
// MEMBER_K1: "stream(): Stream<String!>"
|
||||
// MEMBER_K1: "parallelStream(): Stream<String!>"
|
||||
// MEMBER_K1: "equals(other: Any?): Boolean"
|
||||
// MEMBER_K1: "listIterator(index: Int): MutableListIterator<String>"
|
||||
// MEMBER_K1: "set(index: Int, element: String): String"
|
||||
// MEMBER_K1: "subList(fromIndex: Int, toIndex: Int): MutableList<String>"
|
||||
// MEMBER_K1: "get(index: Int): String"
|
||||
// MEMBER_K1: "indexOf(element: String): Int"
|
||||
// MEMBER_K1: "lastIndexOf(element: String): Int"
|
||||
// MEMBER_K1: "sort(p0: Comparator<in String!>!): Unit"
|
||||
|
||||
// MEMBER: "clear(): Unit"
|
||||
// MEMBER: "iterator(): MutableIterator<String>"
|
||||
// MEMBER: "remove(element: String): Boolean"
|
||||
// MEMBER: "removeAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "retainAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "contains(element: String): Boolean"
|
||||
// MEMBER: "containsAll(elements: Collection<String!>): Boolean"
|
||||
// MEMBER: "isEmpty(): Boolean"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "forEach(p0: Consumer<in String!>!): Unit"
|
||||
// MEMBER: "spliterator(): Spliterator<String!>"
|
||||
// MEMBER: "toArray(): Array<(out) Any!>!"
|
||||
// MEMBER: "toArray(p0: Array<(out) T!>!): Array<(out) T!>!"
|
||||
// MEMBER: "removeIf(p0: Predicate<in String>): Boolean"
|
||||
// MEMBER: "stream(): Stream<String!>"
|
||||
// MEMBER: "parallelStream(): Stream<String!>"
|
||||
// MEMBER: "listIterator(index: Int): MutableListIterator<String>"
|
||||
// MEMBER: "listIterator(): MutableListIterator<String>"
|
||||
// MEMBER: "removeAt(p0: Int): String"
|
||||
// MEMBER: "set(index: Int, element: String): String"
|
||||
// MEMBER: "subList(fromIndex: Int, toIndex: Int): MutableList<String>"
|
||||
// MEMBER: "get(index: Int): String"
|
||||
// MEMBER: "indexOf(element: String): Int"
|
||||
// MEMBER: "lastIndexOf(element: String): Int"
|
||||
// MEMBER: "replaceAll(p0: UnaryOperator<String>): Unit"
|
||||
// MEMBER: "sort(p0: Comparator<in String!>!): Unit"
|
||||
// MEMBER: "removeRange(p0: Int, p1: Int): Unit"
|
||||
// MEMBER: "clone(): Any"
|
||||
// MEMBER: "trimToSize(): Unit"
|
||||
|
||||
+50
-24
@@ -5,38 +5,64 @@ abstract class X : java.util.ArrayList<String>(), Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "add(element: String): Boolean"
|
||||
// MEMBER: "add(index: Int, element: String): Unit"
|
||||
// MEMBER: "addAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "addAll(index: Int, elements: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "add(p0: String): Boolean"
|
||||
// MEMBER_K2: "add(p0: Int, p1: String): Unit"
|
||||
// MEMBER_K2: "addAll(p0: Collection<out String>): Boolean"
|
||||
// MEMBER_K2: "addAll(p0: Int, p1: Collection<out String>): Boolean"
|
||||
// MEMBER_K2: "remove(p0: String): Boolean"
|
||||
// MEMBER_K2: "removeAll(p0: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "retainAll(p0: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "contains(p0: String): Boolean"
|
||||
// MEMBER_K2: "containsAll(p0: Collection<String>): Boolean"
|
||||
// MEMBER_K2: "forEach(p0: Consumer<in String>?): Unit"
|
||||
// MEMBER_K2: "spliterator(): Spliterator<String?>"
|
||||
// MEMBER_K2: "toArray(): Array<out Any?>"
|
||||
// MEMBER_K2: "<T : Any?> toArray(p0: Array<out T?>): Array<out T?>"
|
||||
// MEMBER_K2: "removeIf(p0: Predicate<in String>): Boolean"
|
||||
// MEMBER_K2: "stream(): Stream<String?>"
|
||||
// MEMBER_K2: "parallelStream(): Stream<String?>"
|
||||
// MEMBER_K2: "equals(p0: Any?): Boolean"
|
||||
// MEMBER_K2: "listIterator(p0: Int): MutableListIterator<String>"
|
||||
// MEMBER_K2: "set(p0: Int, p1: String): String"
|
||||
// MEMBER_K2: "subList(p0: Int, p1: Int): MutableList<String>"
|
||||
// MEMBER_K2: "get(p0: Int): String"
|
||||
// MEMBER_K2: "indexOf(p0: String): Int"
|
||||
// MEMBER_K2: "lastIndexOf(p0: String): Int"
|
||||
// MEMBER_K2: "sort(p0: Comparator<in String>?): Unit"
|
||||
|
||||
// MEMBER_K1: "add(element: String): Boolean"
|
||||
// MEMBER_K1: "add(index: Int, element: String): Unit"
|
||||
// MEMBER_K1: "addAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "addAll(index: Int, elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "remove(element: String): Boolean"
|
||||
// MEMBER_K1: "removeAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "retainAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER_K1: "contains(element: String): Boolean"
|
||||
// MEMBER_K1: "containsAll(elements: Collection<String!>): Boolean"
|
||||
// MEMBER_K1: "forEach(p0: Consumer<in String!>!): Unit"
|
||||
// MEMBER_K1: "spliterator(): Spliterator<String!>"
|
||||
// MEMBER_K1: "toArray(): Array<(out) Any!>!"
|
||||
// MEMBER_K1: "toArray(p0: Array<(out) T!>!): Array<(out) T!>!"
|
||||
// MEMBER_K1: "removeIf(p0: Predicate<in String>): Boolean"
|
||||
// MEMBER_K1: "stream(): Stream<String!>"
|
||||
// MEMBER_K1: "parallelStream(): Stream<String!>"
|
||||
// MEMBER_K1: "equals(other: Any?): Boolean"
|
||||
// MEMBER_K1: "listIterator(index: Int): MutableListIterator<String>"
|
||||
// MEMBER_K1: "set(index: Int, element: String): String"
|
||||
// MEMBER_K1: "subList(fromIndex: Int, toIndex: Int): MutableList<String>"
|
||||
// MEMBER_K1: "get(index: Int): String"
|
||||
// MEMBER_K1: "indexOf(element: String): Int"
|
||||
// MEMBER_K1: "lastIndexOf(element: String): Int"
|
||||
// MEMBER_K1: "sort(p0: Comparator<in String!>!): Unit"
|
||||
|
||||
// MEMBER: "clear(): Unit"
|
||||
// MEMBER: "iterator(): MutableIterator<String>"
|
||||
// MEMBER: "remove(element: String): Boolean"
|
||||
// MEMBER: "removeAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "retainAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "contains(element: String): Boolean"
|
||||
// MEMBER: "containsAll(elements: Collection<String!>): Boolean"
|
||||
// MEMBER: "isEmpty(): Boolean"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "forEach(p0: Consumer<in String!>!): Unit"
|
||||
// MEMBER: "spliterator(): Spliterator<String!>"
|
||||
// MEMBER: "toArray(): Array<(out) Any!>!"
|
||||
// MEMBER: "toArray(p0: Array<(out) T!>!): Array<(out) T!>!"
|
||||
// MEMBER: "removeIf(p0: Predicate<in String>): Boolean"
|
||||
// MEMBER: "stream(): Stream<String!>"
|
||||
// MEMBER: "parallelStream(): Stream<String!>"
|
||||
// MEMBER: "listIterator(index: Int): MutableListIterator<String>"
|
||||
// MEMBER: "listIterator(): MutableListIterator<String>"
|
||||
// MEMBER: "removeAt(p0: Int): String"
|
||||
// MEMBER: "set(index: Int, element: String): String"
|
||||
// MEMBER: "subList(fromIndex: Int, toIndex: Int): MutableList<String>"
|
||||
// MEMBER: "get(index: Int): String"
|
||||
// MEMBER: "indexOf(element: String): Int"
|
||||
// MEMBER: "lastIndexOf(element: String): Int"
|
||||
// MEMBER: "replaceAll(p0: UnaryOperator<String>): Unit"
|
||||
// MEMBER: "sort(p0: Comparator<in String!>!): Unit"
|
||||
// MEMBER: "removeRange(p0: Int, p1: Int): Unit"
|
||||
// MEMBER: "clone(): Any"
|
||||
// MEMBER: "trimToSize(): Unit"
|
||||
|
||||
+2
-1
@@ -4,4 +4,5 @@ class C : A() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "foo(x: (Mutable)List<(raw) Any?>!, y: String!): B<(raw) Any!>!"
|
||||
// MEMBER_K2: "foo(x: List<String?>?, y: String?): B<String?>?"
|
||||
// MEMBER_K1: "foo(x: (Mutable)List<(raw) Any?>!, y: String!): B<(raw) Any!>!"
|
||||
+2
-1
@@ -7,4 +7,5 @@ class C : A() {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(x: (Mutable)List<(raw) Any?>!, y: String!): B<(raw) Any!>!"
|
||||
// MEMBER_K2: "foo(x: List<String?>?, y: String?): B<String?>?"
|
||||
// MEMBER_K1: "foo(x: (Mutable)List<(raw) Any?>!, y: String!): B<(raw) Any!>!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class C : A() {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(x: (Mutable)List<(raw) Any?>!, y: String!): B<(raw) Any!>!"
|
||||
// MEMBER_K2: "foo(x: List<String?>?, y: String?): B<String?>?"
|
||||
// MEMBER_K1: "foo(x: (Mutable)List<(raw) Any?>!, y: String!): B<(raw) Any!>!"
|
||||
+2
-1
@@ -5,4 +5,5 @@ class Impl: B {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "foo(r: Runnable!): Unit"
|
||||
// MEMBER_K2: "foo(r: Runnable?): Unit"
|
||||
// MEMBER_K1: "foo(r: Runnable!): Unit"
|
||||
+2
-1
@@ -7,4 +7,5 @@ class Impl: B {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(r: Runnable!): Unit"
|
||||
// MEMBER_K2: "foo(r: Runnable?): Unit"
|
||||
// MEMBER_K1: "foo(r: Runnable!): Unit"
|
||||
+2
-1
@@ -4,4 +4,5 @@ class Impl(): Intf {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class Impl(): Intf {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class Impl(): Intf {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -3,4 +3,5 @@ package foo
|
||||
class <caret>Impl : TestJavaInterface<String> {
|
||||
}
|
||||
|
||||
// MEMBER: "onTypingEvent(): T!"
|
||||
// MEMBER_K2: "<T : String?> onTypingEvent(): T?"
|
||||
// MEMBER_F10: "onTypingEvent(): T!"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class Impl : TestJavaInterface<String> {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "onTypingEvent(): T!"
|
||||
// MEMBER_K2: "<T : String?> onTypingEvent(): T?"
|
||||
// MEMBER_F10: "onTypingEvent(): T!"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class Impl : TestJavaInterface<String> {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "onTypingEvent(): T!"
|
||||
// MEMBER_K2: "<T : String?> onTypingEvent(): T?"
|
||||
// MEMBER_F10: "onTypingEvent(): T!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class Impl(): Intf() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -11,4 +11,5 @@ class Impl(): Intf() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -11,4 +11,5 @@ class Impl(): Intf() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class Impl(): Intf() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -11,4 +11,5 @@ class Impl(): Intf() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -11,4 +11,5 @@ class Impl(): Intf() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getFooBar(): String!"
|
||||
// MEMBER_K2: "getFooBar(): String?"
|
||||
// MEMBER_K1: "getFooBar(): String!"
|
||||
+2
-1
@@ -4,4 +4,5 @@ class Impl(): Intf {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "fooBar(i: Int, s: Array<(out) String!>!, foo: Any!): Unit"
|
||||
// MEMBER_K2: "fooBar(i: Int, s: Array<out String?>?, foo: Any?): Unit"
|
||||
// MEMBER_K1: "fooBar(i: Int, s: Array<(out) String!>!, foo: Any!): Unit"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class Impl(): Intf {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "fooBar(i: Int, s: Array<(out) String!>!, foo: Any!): Unit"
|
||||
// MEMBER_K2: "fooBar(i: Int, s: Array<out String?>?, foo: Any?): Unit"
|
||||
// MEMBER_K1: "fooBar(i: Int, s: Array<(out) String!>!, foo: Any!): Unit"
|
||||
+2
-1
@@ -6,4 +6,5 @@ class Impl(): Intf {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "fooBar(i: Int, s: Array<(out) String!>!, foo: Any!): Unit"
|
||||
// MEMBER_K2: "fooBar(i: Int, s: Array<out String?>?, foo: Any?): Unit"
|
||||
// MEMBER_K1: "fooBar(i: Int, s: Array<(out) String!>!, foo: Any!): Unit"
|
||||
+8
-3
@@ -3,11 +3,18 @@ abstract class A : List<String> {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER_K2: "forEach(action: Consumer<in String>?): Unit"
|
||||
// MEMBER_K2: "<T : Any?> toArray(generator: IntFunction<Array<out T?>?>?): Array<out T?>?"
|
||||
// MEMBER_K2: "spliterator(): Spliterator<String?>"
|
||||
|
||||
// MEMBER_K1: "forEach(action: Consumer<in String!>!): Unit"
|
||||
// MEMBER_K1: "toArray(generator: IntFunction<Array<(out) T!>!>!): Array<(out) T!>!"
|
||||
// MEMBER_K1: "spliterator(): Spliterator<String!>"
|
||||
|
||||
// MEMBER: "size: Int"
|
||||
// MEMBER: "contains(element: String): Boolean"
|
||||
// MEMBER: "containsAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "forEach(action: Consumer<in String!>!): Unit"
|
||||
// MEMBER: "get(index: Int): String"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "indexOf(element: String): Int"
|
||||
@@ -17,8 +24,6 @@ abstract class A : List<String> {
|
||||
// MEMBER: "listIterator(): ListIterator<String>"
|
||||
// MEMBER: "listIterator(index: Int): ListIterator<String>"
|
||||
// MEMBER: "parallelStream(): Stream<String>"
|
||||
// MEMBER: "spliterator(): Spliterator<String!>"
|
||||
// MEMBER: "stream(): Stream<String>"
|
||||
// MEMBER: "subList(fromIndex: Int, toIndex: Int): List<String>"
|
||||
// MEMBER: "toArray(generator: IntFunction<Array<(out) T!>!>!): Array<(out) T!>!"
|
||||
// MEMBER: "toString(): String"
|
||||
+8
-3
@@ -7,11 +7,18 @@ abstract class A : List<String> {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER_K2: "forEach(action: Consumer<in String>?): Unit"
|
||||
// MEMBER_K2: "<T : Any?> toArray(generator: IntFunction<Array<out T?>?>?): Array<out T?>?"
|
||||
// MEMBER_K2: "spliterator(): Spliterator<String?>"
|
||||
|
||||
// MEMBER_K1: "forEach(action: Consumer<in String!>!): Unit"
|
||||
// MEMBER_K1: "toArray(generator: IntFunction<Array<(out) T!>!>!): Array<(out) T!>!"
|
||||
// MEMBER_K1: "spliterator(): Spliterator<String!>"
|
||||
|
||||
// MEMBER: "size: Int"
|
||||
// MEMBER: "contains(element: String): Boolean"
|
||||
// MEMBER: "containsAll(elements: Collection<String>): Boolean"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "forEach(action: Consumer<in String!>!): Unit"
|
||||
// MEMBER: "get(index: Int): String"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "indexOf(element: String): Int"
|
||||
@@ -21,8 +28,6 @@ abstract class A : List<String> {
|
||||
// MEMBER: "listIterator(): ListIterator<String>"
|
||||
// MEMBER: "listIterator(index: Int): ListIterator<String>"
|
||||
// MEMBER: "parallelStream(): Stream<String>"
|
||||
// MEMBER: "spliterator(): Spliterator<String!>"
|
||||
// MEMBER: "stream(): Stream<String>"
|
||||
// MEMBER: "subList(fromIndex: Int, toIndex: Int): List<String>"
|
||||
// MEMBER: "toArray(generator: IntFunction<Array<(out) T!>!>!): Array<(out) T!>!"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -8,4 +8,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s: String!): String?"
|
||||
// MEMBER_K2: "foo(s: String?): String?"
|
||||
// MEMBER_K1: "foo(s: String!): String?"
|
||||
+2
-1
@@ -10,4 +10,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s: String!): String?"
|
||||
// MEMBER_K2: "foo(s: String?): String?"
|
||||
// MEMBER_K1: "foo(s: String!): String?"
|
||||
+2
-1
@@ -7,7 +7,8 @@ class B : A {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Unit"
|
||||
// MEMBER_K2: "String.foo(): Unit"
|
||||
// MEMBER_K1: "foo(): Unit"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -9,7 +9,8 @@ class B : A {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Unit"
|
||||
// MEMBER_K2: "String.foo(): Unit"
|
||||
// MEMBER_K1: "foo(): Unit"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -9,7 +9,8 @@ class B: A() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Int"
|
||||
// MEMBER_K2: "Int.foo(): Int"
|
||||
// MEMBER_K1: "foo(): Int"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -11,7 +11,8 @@ class B: A() {
|
||||
}
|
||||
}
|
||||
|
||||
// MEMBER: "foo(): Int"
|
||||
// MEMBER_K2: "Int.foo(): Int"
|
||||
// MEMBER_K1: "foo(): Int"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -7,7 +7,8 @@ class B : A {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "prop: Int"
|
||||
// MEMBER_K2: "String.prop: Int"
|
||||
// MEMBER_K1: "prop: Int"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -8,7 +8,8 @@ class B : A {
|
||||
get() = <selection><caret>TODO("Not yet implemented")</selection>
|
||||
}
|
||||
|
||||
// MEMBER: "prop: Int"
|
||||
// MEMBER_K2: "String.prop: Int"
|
||||
// MEMBER_K1: "prop: Int"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -7,4 +7,5 @@ class C : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getAnswer(array: Array<(out) String!>!, number: Int, value: Any!): Int"
|
||||
// MEMBER_K2: "getAnswer(array: Array<out String?>?, number: Int, value: Any?): Int"
|
||||
// MEMBER_K1: "getAnswer(array: Array<(out) String!>!, number: Int, value: Any!): Int"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class C : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getAnswer(array: Array<(out) String!>!, number: Int, value: Any!): Int"
|
||||
// MEMBER_K2: "getAnswer(array: Array<out String?>?, number: Int, value: Any?): Int"
|
||||
// MEMBER_K1: "getAnswer(array: Array<(out) String!>!, number: Int, value: Any!): Int"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class C : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "getAnswer(array: Array<(out) String!>!, number: Int, value: Any!): Int"
|
||||
// MEMBER_K2: "getAnswer(array: Array<out String?>?, number: Int, value: Any?): Int"
|
||||
// MEMBER_K1: "getAnswer(array: Array<(out) String!>!, number: Int, value: Any!): Int"
|
||||
+2
-1
@@ -7,7 +7,8 @@ class B : A {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// MEMBER: "foo: Double"
|
||||
// MEMBER_K2: "Int.foo: Double"
|
||||
// MEMBER_K1: "foo: Double"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -9,7 +9,8 @@ class B : A {
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
// MEMBER: "foo: Double"
|
||||
// MEMBER_K2: "Int.foo: Double"
|
||||
// MEMBER_K1: "foo: Double"
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
+2
-1
@@ -8,4 +8,5 @@ class Impl: B() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(r: Runnable!): Unit"
|
||||
// MEMBER_K2: "foo(r: Runnable?): Unit"
|
||||
// MEMBER_K1: "foo(r: Runnable!): Unit"
|
||||
+2
-1
@@ -10,4 +10,5 @@ class Impl: B() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(r: Runnable!): Unit"
|
||||
// MEMBER_K2: "foo(r: Runnable?): Unit"
|
||||
// MEMBER_K1: "foo(r: Runnable!): Unit"
|
||||
+2
-1
@@ -7,4 +7,5 @@ class B : A {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(): (Mutable)List<String!>!"
|
||||
// MEMBER_K2: "foo(): List<String?>?"
|
||||
// MEMBER_K1: "foo(): (Mutable)List<String!>!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class B : A {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(): (Mutable)List<String!>!"
|
||||
// MEMBER_K2: "foo(): List<String?>?"
|
||||
// MEMBER_K1: "foo(): (Mutable)List<String!>!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class B : A {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(): (Mutable)List<String!>!"
|
||||
// MEMBER_K2: "foo(): List<String?>?"
|
||||
// MEMBER_K1: "foo(): (Mutable)List<String!>!"
|
||||
+2
-1
@@ -7,4 +7,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s: String!): String!"
|
||||
// MEMBER_K2: "foo(s: String?): String?"
|
||||
// MEMBER_K1: "foo(s: String!): String!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s: String!): String!"
|
||||
// MEMBER_K2: "foo(s: String?): String?"
|
||||
// MEMBER_K1: "foo(s: String!): String!"
|
||||
+2
-1
@@ -9,4 +9,5 @@ class B : A() {
|
||||
// MEMBER: "equals(other: Any?): Boolean"
|
||||
// MEMBER: "hashCode(): Int"
|
||||
// MEMBER: "toString(): String"
|
||||
// MEMBER: "foo(s: String!): String!"
|
||||
// MEMBER_K2: "foo(s: String?): String?"
|
||||
// MEMBER_K1: "foo(s: String!): String!"
|
||||
Reference in New Issue
Block a user