Commit Graph

104 Commits

Author SHA1 Message Date
Alexander Udalov 04026dbe84 Make Array<T>(size, init) a constructor of Array
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Denis Zharkov 6c0cd70a22 Introduce PureReifiable annotation
It prevents reporting unsafe substitution warning on expressions
like 'arrayOf(arrayOf(""))'
2016-01-22 19:17:22 +03:00
Denis Zharkov 32755a269c Support annotations on type parameters in stub builder 2016-01-22 19:17:22 +03:00
Ilya Gorbunov 875287574f Update testData for LoadBuiltinsTest and BuiltInDecompilerTest 2016-01-22 05:54:38 +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
Ilya Gorbunov de11ed4fc6 Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
2015-12-24 06:17:03 +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
Ilya Gorbunov 03816373b3 Primitive array constructor-like functions with init lambda.
#KT-8831

Update testData and resolve ambiguity in newArray test
2015-12-18 17:54:09 +03:00
Ilya Gorbunov 58e93d5e1b Update testData for LoadBuiltinsTest and BuiltInDecompilerTest 2015-12-14 04:29:28 +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
Pavel V. Talanov deb6410a5c Add test for builtIn stub builder and decompiler
These test are by no means exhaustive, the correctness of the subsystem relies on it sharing code with well-tested js-decompilation
2015-12-09 18:51:30 +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
Dmitry Petrov 149e70aa07 Dropping package facades:
- light classes: do not generate light class for package facade
- drop package facades as multifile classes compilation mode support
- get rid of some additional package facade fqName usages
- update tests for light classes
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
Mikhail Glukhikh a4af6a3076 data deprecations (empty constructors, non val/var arguments, vararg, superclasses) are now errors, relevant tests fixed 2015-10-19 15:24:28 +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
Mikhail Glukhikh 2fee9d362c Local interfaces are forbidden now 2015-10-09 21:06:33 +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
Stanislav Erokhin 8efbf4fc32 Fixed testdata -- removed package import 2015-09-18 21:00:20 +03:00
Valentin Kipyatkov 452cd49c5e Disallowed @Deprecated for local variables and parameters 2015-09-18 15:44:16 +03:00
Denis Zharkov 7ea7e3cc7c Render '@' before each annotation 2015-09-18 10:14:38 +03:00
Denis Zharkov bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00
Mikhail Glukhikh 3770e7f49f Introduction of AnnotationTarget.CLASS as a replacement for CLASSIFIER (first step) 2015-09-11 17:59:40 +03:00
Dmitry Petrov cd341e957e Cleanup after review
+ stub builder test for multifile class
2015-09-09 19:08:19 +03:00
Dmitry Petrov 0c951b2ed3 Decompilation support
- class header reader for KotlinMultifileClass, KotlinMultifileClassPart
- proper implClassName for multifile class members
2015-09-09 19:08:18 +03:00
Denis Zharkov fc447e2d2f Parse some builtin annotations as modifiers
But still resolve them as annotations.
Mostly it's needed as begin of migration path, one day they become modifiers anyway

Some tests are dropped because they supposed that `annotation` should have parameter
2015-09-08 08:53:35 +03:00
Michael Nedzelsky c861b036a0 fix tests in org.jetbrains.kotlin.idea.decompiler.textBuilder 2015-09-08 02:05:30 +03:00
Michael Nedzelsky a119a6bbeb fix tests in org.jetbrains.kotlin.idea.decompiler.stubBuilder 2015-09-08 02:05:25 +03:00
Michael Nedzelsky 1a48ccff4c fix tests in org.jetbrains.kotlin.idea.decompiler.navigation 2015-09-08 02:05:21 +03:00
Dmitry Petrov f9901f6075 Fix decompiler tests.
For now, JVM and JS backends produce different metadata for package facades (and package parts),
and thus different output is expected for JVM and JS decompiler.
Split decompiler tests into common (decompiledText), JVM-specific (decompiledTextJvm),
and JS-specific (decompiledTextJs)
Join them back together if JS backend migrates to JVM-like package model.
2015-09-07 16:29:01 +03:00
Dmitry Petrov 0289b8e290 Fix tests: ClsStubBuilderTestGenerated should honor new file part generation scheme. 2015-09-07 16:28:58 +03:00
Dmitry Petrov 8e6054f6c7 Fix tests:
- package parts are no longer built;
- test decompiled content for default file facades.
2015-09-07 16:28:58 +03:00
Mikhail Glukhikh 8f7b29f80a Annotation rename: target --> @Target 2015-09-07 13:42:26 +03:00