Support type annotations in cls stub builder

Also add test on decompiler
This commit is contained in:
Alexander Udalov
2015-04-09 22:49:35 +03:00
parent 0732b78853
commit fe602d34ce
13 changed files with 145 additions and 40 deletions
@@ -4,7 +4,7 @@
package test
kotlin.data dependency.A dependency.B dependency.C internal final class Annotations public () {
kotlin.inline dependency.A dependency.B dependency.C internal final val p: kotlin.Int /* compiled code */
kotlin.inline dependency.A dependency.B dependency.C internal final val p: [dependency.B] kotlin.Int /* compiled code */
kotlin.inline dependency.A dependency.B dependency.C internal final fun f(dependency.A dependency.B dependency.C kotlin.deprecated i: kotlin.Int): kotlin.Unit { /* compiled code */ }
kotlin.inline dependency.A dependency.B dependency.C internal final fun f(dependency.A dependency.B dependency.C kotlin.deprecated i: [dependency.A] kotlin.Int): kotlin.Unit { /* compiled code */ }
}
@@ -4,8 +4,8 @@ import dependency.*
data A("a") B(1) C class Annotations {
inline A("f") B(2) C fun f(A("i") B(3) C deprecated("1") i: Int) {
inline A("f") B(2) C fun f(A("i") B(3) C deprecated("1") i: [A("int")] Int) {
}
inline A("p") B(3) C val p: Int = 2
inline A("p") B(3) C val p: [B(4)] Int = 2
}
@@ -21,6 +21,8 @@ a public class Annotations private [a] (private [a] val c1: Int, [a] val c2: Int
}
class Nested [a] private [b(E.E1) b(E.E2)] ()
fun types(param: [a] [b(E.E1)] DoubleRange): [a] [b(E.E2)] Unit {}
}
annotation class a
@@ -153,6 +153,42 @@ PsiJetFileStubImpl[package=]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Unit]
FUN:[fqName=Annotations.types, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=types]
MODIFIER_LIST:[internal final]
VALUE_PARAMETER_LIST:
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVarNode=false, isMutable=false, name=param]
TYPE_REFERENCE:
ANNOTATION:
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=a]
CONSTRUCTOR_CALLEE:
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=a]
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=b]
CONSTRUCTOR_CALLEE:
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=b]
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=DoubleRange]
TYPE_REFERENCE:
ANNOTATION:
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=a]
CONSTRUCTOR_CALLEE:
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=a]
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=b]
CONSTRUCTOR_CALLEE:
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=b]
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Unit]
CLASS:[fqName=Annotations.Nested, isEnumEntry=false, isLocal=false, isTopLevel=false, isTrait=false, name=Nested, superNames=[]]
MODIFIER_LIST:[internal final]
PRIMARY_CONSTRUCTOR: