Move inference parameter type in FunctionDescriptorResolver

This commit is contained in:
Stanislav Erokhin
2015-03-05 12:56:50 +03:00
parent 0c74675e6e
commit d9882a6d0b
13 changed files with 294 additions and 267 deletions
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
fun test(a<!SYNTAX!><!>) {
}
class A(a<!SYNTAX!><!>)
val bar = fun test(a<!SYNTAX!><!>){}
val la = { (<!CANNOT_INFER_PARAMETER_TYPE!>a<!>) -> }
val las = { (a: Int) -> }
@@ -0,0 +1,13 @@
package
internal val bar: (???) -> kotlin.Unit
internal val la: (???) -> kotlin.Unit
internal val las: (kotlin.Int) -> kotlin.Unit
internal fun test(/*0*/ a: [ERROR : Type annotation was missing for parameter a]): kotlin.Unit
internal final class A {
public constructor A(/*0*/ a: [ERROR : Type annotation was missing for parameter a])
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
}
@@ -0,0 +1,9 @@
annotation class ann
fun test([ann] <!UNUSED_PARAMETER!>p<!>: Int) {
}
val bar = fun test([ann] <!UNUSED_PARAMETER!>g<!>: Int) {}
val bas = { ([ann] t: Int) -> }
@@ -0,0 +1,12 @@
package
internal val bar: (kotlin.Int) -> kotlin.Unit
internal val bas: (kotlin.Int) -> kotlin.Unit
internal fun test(/*0*/ ann() p: kotlin.Int): kotlin.Unit
internal final annotation class ann : kotlin.Annotation {
public constructor 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
}
@@ -38,7 +38,7 @@ internal final class C1</*0*/ in <no name provided>> {
}
internal final class C2 {
public constructor C2(/*0*/ <no name provided>: [ERROR : Type annotation was missing])
public constructor C2(/*0*/ <no name provided>: [ERROR : Type annotation was missing for parameter <no name provided>])
internal final val <no name provided>: [ERROR : Annotation is absent]
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int