Adjust descriptor renderer to latest parsing changes

- `constructor` keyword expected in primary constructor with non-empty modifier list
- annotation list should be preceeded by '@'
This commit is contained in:
Denis Zharkov
2015-05-18 16:18:55 +03:00
parent dd14b36921
commit 5297b4974f
31 changed files with 45 additions and 44 deletions
@@ -2,4 +2,4 @@ package test
annotation class A
fun ([A] String).foo() {}
fun (@A String).foo() {}
@@ -1,6 +1,6 @@
package test
internal fun [test.A()] kotlin.String.foo(): kotlin.Unit
internal fun @[test.A()] kotlin.String.foo(): kotlin.Unit
internal final annotation class A : kotlin.Annotation {
/*primary*/ public constructor A()
@@ -3,5 +3,5 @@ package test
annotation class A
class SimpleTypeAnnotation {
fun foo(x: [A] IntRange): [A] Int = 42
fun foo(x: @A IntRange): @A Int = 42
}
@@ -6,5 +6,5 @@ internal final annotation class A : kotlin.Annotation {
internal final class SimpleTypeAnnotation {
/*primary*/ public constructor SimpleTypeAnnotation()
internal final fun foo(/*0*/ x: [test.A()] kotlin.IntRange): [test.A()] kotlin.Int
internal final fun foo(/*0*/ x: @[test.A()] kotlin.IntRange): @[test.A()] kotlin.Int
}
@@ -2,6 +2,6 @@ package test
annotation class A
trait Foo<T : [A] Number> : [A] CharSequence {
fun <E, F : [A] E> bar()
trait Foo<T : @A Number> : @A CharSequence {
fun <E, F : @A E> bar()
}
@@ -4,8 +4,8 @@ internal final annotation class A : kotlin.Annotation {
/*primary*/ public constructor A()
}
internal interface Foo</*0*/ T : [test.A()] kotlin.Number> : [test.A()] kotlin.CharSequence {
internal abstract fun </*0*/ E, /*1*/ F : [test.A()] E> bar(): kotlin.Unit
internal interface Foo</*0*/ T : @[test.A()] kotlin.Number> : @[test.A()] kotlin.CharSequence {
internal abstract fun </*0*/ E, /*1*/ F : @[test.A()] E> bar(): kotlin.Unit
public abstract override /*1*/ /*fake_override*/ fun charAt(/*0*/ index: kotlin.Int): kotlin.Char
public abstract override /*1*/ /*fake_override*/ fun length(): kotlin.Int
public abstract override /*1*/ /*fake_override*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence
@@ -5,5 +5,5 @@ package test
annotation class Ann(val x: String, val y: Double)
class TypeAnnotationWithArguments {
fun foo(param: [Ann("param", 3.14)] IntRange): [Ann("fun", 2.72)] Unit {}
fun foo(param: @Ann("param", 3.14) IntRange): @Ann("fun", 2.72) Unit {}
}
@@ -10,5 +10,5 @@ internal final annotation class Ann : kotlin.Annotation {
internal final class TypeAnnotationWithArguments {
/*primary*/ public constructor TypeAnnotationWithArguments()
internal final fun foo(/*0*/ param: [test.Ann(x = "param": kotlin.String, y = 3.14.toDouble(): kotlin.Double)] kotlin.IntRange): [test.Ann(x = "fun": kotlin.String, y = 2.72.toDouble(): kotlin.Double)] kotlin.Unit
internal final fun foo(/*0*/ param: @[test.Ann(x = "param": kotlin.String, y = 3.14.toDouble(): kotlin.Double)] kotlin.IntRange): @[test.Ann(x = "fun": kotlin.String, y = 2.72.toDouble(): kotlin.Double)] kotlin.Unit
}