Nikolay Krasko
bc7ccbc39b
Fix stub mismatch for top level declaration with JvmPackageName (KT-21831)
...
ClassId stores jvm name and it differs from kotlin name in that case.
#KT-21831 Fixed
2018-03-14 21:16:58 +03:00
Nikolay Krasko
d75656d571
Additional tests for overloads with type aliases and suspend
...
Failed attempts to reproduce KT-20782, but still may be useful.
2017-10-27 15:09:52 +03:00
Nikolay Krasko
74043089ab
Generate modifier list stub under nullable type for suspend functions (KT-20185)
...
Otherwise there's a PSI and Stub mismatch error produced.
#KT-20185 Fixed
2017-09-14 12:28:26 +03:00
Nikolay Krasko
99555fa843
Retrieve receiver annotation to stubs from compiled code (KT-19209)
...
#KT-19209 Fixed
2017-07-28 15:01:32 +03:00
Mikhail Glukhikh
212f6e0432
Stub creation from cls fixed for suspend function types
...
(cherry picked from commit f49ef8e)
2017-02-02 17:54:06 +03:00
Denis Zharkov
8fa8ba7055
Move coroutine-related runtime parts to kotlin.coroutines.experimental package
...
#KT-15975 Fixed
2017-01-27 23:24:13 +03:00
Dmitry Petrov
b9f9894310
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.
2017-01-19 09:53:17 +03:00
Nikolay Krasko
c076ad5a8d
Don't assign type parameters from original proto if type is substituted with Any (KT-15128)
...
#KT-15128 Fixed
2016-12-20 15:16:23 +03:00
Denis Zharkov
4737b3dd7f
Update stubBuilder/deserialization tests on coroutines
2016-12-15 23:58:02 +03:00
Dmitry Petrov
9dc458375a
Build proper modifier list stubs for 'SuspendFunction$n<...>' types.
2016-12-15 23:57:43 +03:00
Dmitry Petrov
cf4fb1eb25
Since '@A R.() -> T' is now parsed as '@A (R.() -> T)',
...
receiver type with modifiers or annotations should be surrounded in parentheses on rendering: '(@A R).() -> T'
This also fixes stub builder tests (which check that stubs are consistent with rendered descriptors).
2016-12-15 23:57:42 +03:00
Dmitry Petrov
a15d423db4
Support modifiers on types in parser
...
(required for 'suspend' on functional types).
TYPE_REFERENCE element now has MODIFIER_LIST child, which hosts annotations and modifiers for the corresponding type reference.
Annotations and modifiers written before an extension function type are now parsed as annotations and modifiers for the functional type, not the receiver type.
So, '@Ann A.(B) -> C' was '(@Ann A).(B) -> C', and became '@Ann (A.(B) -> C)'.
NB: DSL_SCOPE_VIOLATION testData updated accordingly.
Type projection variance modifiers ('in', 'out') belong to a separate modifier list under corresponding type projection (not under a type reference).
'A<in suspend T>' is 'A<(in (suspend T))>', 'A<suspend in T>' is an error.
In stub builder, create a modifier list node to host annotations and modifiers (none so far; TODO properly serialize/deserialize types with modifiers).
2016-12-15 23:57:41 +03:00
Dmitry Petrov
f415050913
Suppress TOPLEVEL_TYPEALIASES_ONLY in decompiler and stubBuilder tests.
2016-11-24 10:41:50 +03:00
Nikolay Krasko
cdabef51ed
Add nullability to receiver type
2016-10-25 13:30:38 +03:00
Nikolay Krasko
22999fe67d
Set hasValueArguments in KotlinAnnotationEntryStub to 'true' only if some arguments exist
...
Currently '()' is used for resolving ambiguity in parsing when annotating function types. This way a decompiled code
will need brackets, but compile code will have annotation without parameters. This commit will allow to make both stub-trees consistent.
Tested in ClsStubBuilderTestGenerated.testAnnotationsOnNullableTypes()
2016-10-25 13:30:37 +03:00
Nikolay Krasko
a344ad0644
Fix absence of annotation for function type in cls stubs and ignore @ExtensionFunctionType
2016-10-25 13:30:35 +03:00
Nikolay Krasko
d1dfcfaca1
Fix stub-psi mismatch exception on restoring annotation for nullable types
...
(cherry picked from commit 1aa37f11258dde289a9f7cb700294a038168fbdc)
Conflicts:
compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt
idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt
2016-10-25 13:22:53 +03:00
Nikolay Krasko
355dca2a97
Add toString for KotlinStubBaseImpl
...
Try to simplify "Stub and PSI element type mismatch" exception analyze.
(cherry picked from commit 11aa71e)
2016-10-21 00:18:27 +03:00
Dmitry Petrov
d2d8f72ffc
Annotations on type aliases: typealias is not a "default target".
...
Add diagnostic test for annotations on type aliases.
2016-10-13 17:52:21 +03:00
Pavel V. Talanov
14f3e4c758
Cls stubs and decompiled text: Do not render parameter names in decompiled text and do not load ParameterName annotation in stubs
...
Add tests for decompiled text and stubs
2016-10-11 23:38:53 +03:00
Denis Zharkov
d53c53a900
Support annotations on type aliases declarations
2016-06-28 10:33:29 +03:00
Denis Zharkov
e24f0653fb
Support type aliases in stub builder
2016-06-28 10:33:29 +03:00
Denis Zharkov
329fb9d619
Introduce 'coroutine'/'suspend' modifiers
2016-06-08 18:53:16 +03:00
Alexander Udalov
7eafae1936
Drop isAbsoluteInRootPackage from stubs
2016-06-01 19:30:04 +03:00
Alexander Udalov
4a533168d9
Rework const val generation in multifile classes
...
Do not query MultifileClassCodegen#classBuilder early on: this causes the class
file for the facade to be prematurely dumped to the disk in some cases, when
that class file is not yet completely generated. Instead fork the logic in
PropertyCodegen#generateSyntheticMethodIfNeeded: save metadata in parts,
generate method in the facade
2016-03-29 17:53:32 +03:00
Denis Zharkov
32755a269c
Support annotations on type parameters in stub builder
2016-01-22 19:17:22 +03:00
Ilya Gorbunov
f4822cd757
Fix testData in compiler: add collections and ranges package to fq-names.
2016-01-22 05:54:38 +03:00
Alexander Udalov
12e921ab15
Minor, add test on annotation in enum companion
2015-12-23 16:45:26 +03:00
Alexander Udalov
f7969621d6
Don't read isStaticInOuter message for fields
...
It's only written for fields of properties of companion objects of classes;
handle that case manually in deserialization
2015-12-23 16:45:26 +03:00
Alexander Udalov
7449ad2763
Rename Extension annotation to ExtensionFunctionType
...
The old one is kept temporarily and will be removed later
2015-12-21 20:33:32 +03:00
Alexander Udalov
65c5c99c68
Render decompiled annotations on enum entries
2015-12-13 17:49:44 +03:00
Dmitry Jemerov
009e3f9cd7
rename PSI classes according to current terminology:
...
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Pavel V. Talanov
7e6bed7ad8
Decompiled text: should always render all modifiers even if we don't feel like it
2015-12-09 18:51:31 +03:00
Alexander Udalov
d3c17ec337
Report error when type parameter has a type parameter bound and any other bound
...
To prevent issues with erasure on JVM: it's unclear what such type parameter
should be erased to
2015-12-07 15:47:47 +03:00
Alexander Udalov
5fbb9bfe3b
Report error on repeated upper bounds for type parameters
2015-12-07 15:47:47 +03:00
Alexander Udalov
877129340f
Revert "Rename Extension annotation to ExtensionFunctionType"
...
This reverts commit 460dad135c .
The old compiler will not see the new runtime correctly. Postponing this until
1.0
2015-11-30 19:24:58 +03:00
Alexander Udalov
460dad135c
Rename Extension annotation to ExtensionFunctionType
2015-11-30 02:51:04 +03:00
Yan Zhulanow
a3ff3ffc45
Fix tests: "Placing function type parameters after the function name" error
2015-11-27 15:51:11 +03:00
Mikhail Glukhikh
4e44466cf9
Exposed visibility deprecation warnings made errors + relevant test fixes
2015-11-20 15:21:01 +03:00
Denis Zharkov
6ae653e5a1
Implement stub building for inner types
2015-11-13 14:59:04 +03:00
Ilya Gorbunov
55d4d17dc3
Fix dropped DoubleRange and FloatRange usages in tests
2015-11-11 03:53:49 +03:00
Alexey Tsvetkov
5e90bafe18
Build stubs for modifiers
2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
28ca2e8b84
Build stubs for data modifier
2015-10-19 20:45:00 +03:00
Pavel V. Talanov
93bb010875
Drop decompiledText/clsStub tests for package facades
...
(cherry picked from commit fbaa81c)
2015-10-19 16:03:16 +03:00
Pavel V. Talanov
aeb4abe39d
Fix decompiled text for named companion object
...
Fix stub/ast mismatch for compiled named companion objects
Add tests
2015-10-19 15:27:49 +03:00
Michael Nedzelsky
8e9f1ac31a
Extension function type is not allowed as supertype
2015-10-16 14:23:47 +03:00
Pavel V. Talanov
47cca7db1f
Test data: adjust test data after prohibiting properties with typeparameters not used in receiver
2015-10-14 13:42:13 +03:00
Svetlana Isakova
9b1030de2e
Annotations on type projection belong to type reference
2015-10-09 11:05:52 +03:00
Yan Zhulanow
6db9344659
Fix compiler tests
2015-09-25 19:20:20 +03:00
Denis Zharkov
e1e3a6c9ad
Introduce const into decompiler and stub builder
2015-09-23 08:20:57 +03:00