Use parameter names in DescriptorRenderer

This commit is contained in:
Valentin Kipyatkov
2016-09-13 12:31:53 +03:00
parent f335f32b48
commit 41ee06ec96
100 changed files with 239 additions and 223 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ Type inference failed:
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(???) &rarr; ???</b></font></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(x: ???) &rarr; ???</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
+1 -1
View File
@@ -18,7 +18,7 @@ Type inference failed:
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(Int) &rarr; Int</b></font></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(x: Int) &rarr; Int</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
@@ -9,8 +9,8 @@
// ACTION: Rename reference
// ERROR: A 'return' expression required in a function with a block body ('{...}')
// ERROR: The expression cannot be a selector (occur after a dot)
// ERROR: Type inference failed: inline fun <T> Iterable<T>.firstOrNull(predicate: (T) -> Boolean): T?<br>cannot be applied to<br>receiver: Collection<List<String>> arguments: ((List<String>) -> () -> Boolean)<br>
// ERROR: Type mismatch: inferred type is (List<String>) -> () -> Boolean but (List<String>) -> Boolean was expected
// ERROR: Type inference failed: inline fun <T> Iterable<T>.firstOrNull(predicate: (T) -> Boolean): T?<br>cannot be applied to<br>receiver: Collection<List<String>> arguments: ((group: List<String>) -> () -> Boolean)<br>
// ERROR: Type mismatch: inferred type is (group: List<String>) -> () -> Boolean but (List<String>) -> Boolean was expected
// ERROR: Unresolved reference: maximumSizeOfGroup
fun doSomethingStrangeWithCollection(collection: Collection<String>): Collection<String>? {
@@ -1,4 +1,4 @@
// "Change 'foo' function return type to '([ERROR : NoSuchType]) -> Int'" "false"
// "Change 'foo' function return type to '(x: [ERROR : NoSuchType]) -> Int'" "false"
// ACTION: Create annotation 'NoSuchType'
// ACTION: Create class 'NoSuchType'
// ACTION: Create enum 'NoSuchType'
@@ -6,7 +6,7 @@
// ACTION: Create type alias 'NoSuchType'
// ACTION: Remove explicit lambda parameter types (may break code)
// ACTION: Create type parameter 'NoSuchType' in function 'foo'
// ERROR: Type mismatch: inferred type is ([ERROR : NoSuchType]) -> Int but Int was expected
// ERROR: Type mismatch: inferred type is (x: [ERROR : NoSuchType]) -> Int but Int was expected
// ERROR: Unresolved reference: NoSuchType
fun foo(): Int {
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun baz(m: kotlin.Int): kotlin.Int defined in foo.bar
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: (kotlin.Int) -> kotlin.Int
// PARAM_TYPES: (m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
// SIBLING:
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun baz(m: kotlin.Int): kotlin.Int defined in foo.bar
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: (kotlin.Int) -> kotlin.Int
// PARAM_TYPES: (m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
// SIBLING:
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar(m: Int) = this * m * n
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar(m: Int) = this * m * n
@@ -2,8 +2,8 @@
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar1(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar2(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar1(m: Int) = this + m + n
@@ -2,8 +2,8 @@
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar1(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar2(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar1(m: Int) = this + m + n
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar(m: Int) = this * m * n
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun kotlin.Int.bar(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: kotlin.Int.(kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int.(m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun Int.bar(m: Int) = this * m * n
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun bar(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: (kotlin.Int) -> kotlin.Int
// PARAM_TYPES: (m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun bar(m: Int) = m * n
@@ -1,7 +1,7 @@
// OPTIONS: true, false, false, false, true, false
// PARAM_DESCRIPTOR: local final fun bar(m: kotlin.Int): kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter n: kotlin.Int defined in foo
// PARAM_TYPES: (kotlin.Int) -> kotlin.Int
// PARAM_TYPES: (m: kotlin.Int) -> kotlin.Int
// PARAM_TYPES: kotlin.Int
fun foo(n: Int): Int {
fun bar(m: Int) = m * n