KT-15677 KT-15775

Update parser & descriptor renderer to handle parenthesized types and function types properly.
Resolve annotations in parenthesized types.

AnnotationsImpl.isEmpty() returned false for targeted annotations only
(e.g., 'fun @receiver:Ann C?.foo()').
Properly keep track of targeted annotations.
This commit is contained in:
Dmitry Petrov
2017-01-13 16:29:40 +03:00
parent a429992e81
commit b9f9894310
45 changed files with 2094 additions and 67 deletions
@@ -4,7 +4,7 @@ annotation class special
@Target(AnnotationTarget.TYPE)
annotation class base
fun transform(i: Int, tr: (@<!DEBUG_INFO_MISSING_UNRESOLVED!>special<!> Int) -> Int): Int = @special tr(@special i)
fun transform(i: Int, tr: (<!WRONG_ANNOTATION_TARGET!>@special<!> Int) -> Int): Int = @special tr(@special i)
fun foo(i: Int): Int {
val j = @special i + 1
@@ -1,7 +1,7 @@
package
public fun foo(/*0*/ i: kotlin.Int): kotlin.Int
public fun transform(/*0*/ i: kotlin.Int, /*1*/ tr: (kotlin.Int) -> kotlin.Int): kotlin.Int
public fun transform(/*0*/ i: kotlin.Int, /*1*/ tr: (@special kotlin.Int) -> kotlin.Int): kotlin.Int
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class base : kotlin.Annotation {
public constructor base()