[IR] update testdata: improve annotations rendering in case when argument was not provided and there is default value

This commit is contained in:
Zalim Bashorov
2020-11-11 14:47:06 +03:00
committed by teamcityserver
parent a34a311e86
commit 87eb06a21f
4 changed files with 27 additions and 27 deletions
@@ -26,7 +26,7 @@ fun test3() {
fun test4() { fun test4() {
} }
@A() @A
fun test5() { fun test5() {
} }
@@ -1,4 +1,4 @@
@JavaAnn() @JavaAnn
fun test1() { fun test1() {
} }
@@ -62,35 +62,35 @@ fun test1() {
fun test2() { fun test2() {
// COMPOSITE { // COMPOSITE {
val tmp0_container: @FlexibleNullability Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String>? = notNullComponents() val tmp0_container: @FlexibleNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String>? = notNullComponents()
val x: @NotNull() @EnhancedNullability String = tmp0_container /*!! Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> */.component1() val x: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1()
val y: @NotNull() @EnhancedNullability String = tmp0_container /*!! Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> */.component2() val y: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2()
// } // }
use(x = x /*!! @NotNull() String */, y = y /*!! @NotNull() String */) use(x = x /*!! @NotNull String */, y = y /*!! @NotNull String */)
} }
fun test2Desugared() { fun test2Desugared() {
val tmp: @FlexibleNullability Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String>? = notNullComponents() val tmp: @FlexibleNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String>? = notNullComponents()
val x: @NotNull() String = tmp /*!! Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> */.component1() /*!! @NotNull() String */ val x: @NotNull String = tmp /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1() /*!! @NotNull String */
val y: @NotNull() String = tmp /*!! Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> */.component2() /*!! @NotNull() String */ val y: @NotNull String = tmp /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2() /*!! @NotNull String */
use(x = x, y = y) use(x = x, y = y)
} }
fun test3() { fun test3() {
// COMPOSITE { // COMPOSITE {
val tmp0_container: @EnhancedNullability Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> = notNullQAndComponents() val tmp0_container: @EnhancedNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> = notNullQAndComponents()
val x: @NotNull() @EnhancedNullability String = tmp0_container /*!! Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> */.component1() val x: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1()
val y: @NotNull() @EnhancedNullability String = tmp0_container /*!! Q<@NotNull() @EnhancedNullability String, @NotNull() @EnhancedNullability String> */.component2() val y: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2()
// } // }
use(x = x /*!! @NotNull() String */, y = y /*!! @NotNull() String */) use(x = x /*!! @NotNull String */, y = y /*!! @NotNull String */)
} }
fun test4() { fun test4() {
// COMPOSITE { // COMPOSITE {
val tmp0_container: IndexedValue<@NotNull() @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull() @EnhancedNullability P> */.withIndex<@NotNull() @EnhancedNullability P>().first<IndexedValue<@NotNull() @EnhancedNullability P>>() val tmp0_container: IndexedValue<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */.withIndex<@NotNull @EnhancedNullability P>().first<IndexedValue<@NotNull @EnhancedNullability P>>()
val x: Int = tmp0_container.component1() val x: Int = tmp0_container.component1()
val y: @NotNull() @EnhancedNullability P = tmp0_container.component2() val y: @NotNull @EnhancedNullability P = tmp0_container.component2()
// } // }
use(x = x, y = y /*!! @NotNull() P */) use(x = x, y = y /*!! @NotNull P */)
} }
@@ -3,9 +3,9 @@ fun use(s: P) {
fun testForInListUnused() { fun testForInListUnused() {
{ // BLOCK { // BLOCK
val tmp0_iterator: MutableIterator<@NotNull() @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull() @EnhancedNullability P> */ /*as MutableList<*> */.iterator() val tmp0_iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK while (tmp0_iterator.hasNext()) { // BLOCK
val x: @NotNull() @EnhancedNullability P = tmp0_iterator.next() val x: @NotNull @EnhancedNullability P = tmp0_iterator.next()
{ // BLOCK { // BLOCK
} }
} }
@@ -14,11 +14,11 @@ fun testForInListUnused() {
fun testForInListDestructured() { fun testForInListDestructured() {
{ // BLOCK { // BLOCK
val tmp0_iterator: MutableIterator<@NotNull() @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull() @EnhancedNullability P> */ /*as MutableList<*> */.iterator() val tmp0_iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK while (tmp0_iterator.hasNext()) { // BLOCK
val tmp1_loop_parameter: @NotNull() @EnhancedNullability P = tmp0_iterator.next() val tmp1_loop_parameter: @NotNull @EnhancedNullability P = tmp0_iterator.next()
val x: Int = tmp1_loop_parameter /*!! @NotNull() P */.component1() val x: Int = tmp1_loop_parameter /*!! @NotNull P */.component1()
val y: Int = tmp1_loop_parameter /*!! @NotNull() P */.component2() val y: Int = tmp1_loop_parameter /*!! @NotNull P */.component2()
{ // BLOCK { // BLOCK
} }
} }
@@ -26,9 +26,9 @@ fun testForInListDestructured() {
} }
fun testDesugaredForInList() { fun testDesugaredForInList() {
val iterator: MutableIterator<@NotNull() @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull() @EnhancedNullability P> */ /*as MutableList<*> */.iterator() val iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
while (iterator.hasNext()) { // BLOCK while (iterator.hasNext()) { // BLOCK
val x: @NotNull() P = iterator.next() /*!! @NotNull() P */ val x: @NotNull P = iterator.next() /*!! @NotNull P */
} }
} }
@@ -45,11 +45,11 @@ fun testForInArrayUnused(j: J) {
fun testForInListUse() { fun testForInListUse() {
{ // BLOCK { // BLOCK
val tmp0_iterator: MutableIterator<@NotNull() @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull() @EnhancedNullability P> */ /*as MutableList<*> */.iterator() val tmp0_iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator()
while (tmp0_iterator.hasNext()) { // BLOCK while (tmp0_iterator.hasNext()) { // BLOCK
val x: @NotNull() @EnhancedNullability P = tmp0_iterator.next() val x: @NotNull @EnhancedNullability P = tmp0_iterator.next()
{ // BLOCK { // BLOCK
use(s = x /*!! @NotNull() P */) use(s = x /*!! @NotNull P */)
use(s = x) use(s = x)
} }
} }