Commit Graph

45606 Commits

Author SHA1 Message Date
Raluca Sauciuc 258cba2cf8 More fixes for Android Studio 3.2 compatibility 2018-04-24 16:46:33 +03:00
Mikaël Peltier 76cd20c574 KT-23721 Emit an error when 'tools.jar' is not into plugin classpath
- Since warnings are discarded when there are others errors, replace the
current warning by an error to always display the message and inform the
user that its annotation processor is badly configured.

Fix of https://youtrack.jetbrains.com/issue/KT-23721
2018-04-24 16:10:03 +03:00
Mikhail Zarechenskiy d2d92a2153 [NI] Fix exception, don't try to get parent on root fqName
#EA-119579 Fixed
2018-04-24 15:22:29 +03:00
Roman Artemev 61e051cafa Update test data 2018-04-24 14:04:16 +03:00
Roman Artemev ec57a335f7 Temporally hacked js assert to make depending tests work 2018-04-24 13:52:16 +03:00
Nicolay Mitropolsky efdc5701d9 Uast: removing SimpleKotlinRenderLogTest.kt.181 2018-04-24 12:35:26 +03:00
Toshiaki Kameyama e58d9c5507 Add intention for converting to block comment and vise versa
So #KT-23137 Fixed
2018-04-24 11:57:56 +03:00
Mikhail Glukhikh 3351b00870 SimpleKotlinRenderLogTest: delete identical branch file (AS32) 2018-04-24 10:31:59 +03:00
Mikhail Glukhikh f9858bf597 SimpleKotlinRenderLogTest: add (forgotten) changes into branches 2018-04-24 10:30:10 +03:00
Ilmir Usmanov 39f4a449ad Remove JvmVersion from kotlin-stdlib-coroutines 2018-04-23 22:20:41 +03:00
Ilmir Usmanov 9cad474f5a Update bootstrap compiler to latest green 2018-04-23 21:52:01 +03:00
Ilmir Usmanov 3cceb13d04 Update inliner test after changing bootstrap compiler 2018-04-23 21:52:00 +03:00
Ilmir Usmanov f60787d57c Move coroutines to kotlin.coroutines package: tests
Introduce COMMON_COROUTINES_TEST directive.
Every test with this directive is run twice: one time with
language version 1.2 and kotlin.coroutines.experimental package
and the other time with language version 1.3 and kotlin.coroutines
package. Each run is a separate method: with suffixes _1_2 and _1_3
respectively.
However, since codegen of release coroutines is not supported in JS
backend, we generate only one method: with suffix _1_2.
 #KT-23362
2018-04-23 21:51:59 +03:00
Ilmir Usmanov 30ab1e2b35 Move coroutines to kotlin.coroutines package: stdlib
Copy everything from kotlin.coroutines.experimental to
kotlin.coroutines. The latter is separate source set to be packed into
separate kotlin-stdlib-coroutines.jar
 #KT-23362
2018-04-23 21:51:58 +03:00
Nicolay Mitropolsky ebdee1f24c 182: JvmDeclarationSearcher-implementation for Kotlin based on light-classes
#KT-23764
2018-04-23 21:37:58 +03:00
Mikaël Peltier b1ef670818 KT-23931 Avoid infinite loop into RedundantGotoMethodTransformer
- Follow-up of 9fb0f59813 to avoid
infinite loop during redundant goto otpimization.

Fix of https://youtrack.jetbrains.com/issue/KT-23931
2018-04-23 20:25:43 +03:00
Pavel V. Talanov 7daf44a806 Fix bunch files after mpp changes 2018-04-23 18:56:36 +02:00
Alexander Udalov 3ce9c03249 Minor, ignore build directories when checking copyrights 2018-04-23 18:42:33 +02:00
Alexander Udalov dfd76502ab Minor, move serializeToByteArray to module 'metadata.jvm' 2018-04-23 18:42:33 +02:00
Alexander Udalov 52a9cc06e0 Remove StringTable.serializeTo, add JvmProtoBufUtil.writeData
StringTable.serializeTo was effectively only used for JvmStringTable,
but was declared in StringTable because of the usage in
DescriptorSerializer.serialize (which, in turn, was only used from JVM
codegen)
2018-04-23 18:42:33 +02:00
Alexander Udalov 58b7643065 Render .kjsm files in incremental tests
Otherwise they, being binary files, are displayed as text, which is
unreadable
2018-04-23 18:42:33 +02:00
Alexander Udalov 965e3ebab2 Do not serialize SOURCE-retained annotations
Also, fix the value of "hasAnnotations" flag to reflect if there are any
_non-source_ annotations on a declaration.

Unfortunately, after this change
IncrementalJsCompilerRunnerTestGenerated$PureKotlin.testAnnotations
starts to fail because of the following problem. The problem is that
annotations on property accessors are not serialized yet on JS (see
KT-14529), yet property proto message has setterFlags field which has
the hasAnnotations flag. Upon the full rebuild of the code in that test,
we correctly write hasAnnotations = true, but annotations themselves are
not serialized. After an incremental build, we deserialize property
setter descriptor, observe its Annotations object which happens to be an
instance of NonEmptyDeserializedAnnotationsWithPossibleTargets. Now,
because annotations itself are not serialized, that Annotations object
has no annotations, yet its isEmpty always returns false (see the code).
Everything worked correctly before the change because in
DescriptorSerializer.hasAnnotations, we used Annotations.isEmpty and the
result was the same in the full rebuild and in the incremental scenario.
But now we're actually loading annotations, to determine their
retention, and that's why the setterFlags are becoming different here
and the test fails

 #KT-23360 Fixed
2018-04-23 18:42:33 +02:00
Alexander Udalov 7bac9b62c7 Reformat VersionRequirement and move to 'metadata' 2018-04-23 18:42:33 +02:00
Alexander Udalov 361f686124 Move ModuleMapping and BinaryModuleData to metadata.jvm 2018-04-23 18:42:32 +02:00
Alexander Udalov d0544a148a Minimize dependencies of ModuleMapping
Prepare it to be moved to metadata.jvm
2018-04-23 18:42:32 +02:00
Ilya Gorbunov 6b800c4230 Remove conditional-preprocessor compiler module 2018-04-23 19:05:13 +03:00
Ilya Gorbunov 2c74b91de4 Remove JvmVersion annotation and its usages 2018-04-23 19:05:13 +03:00
Dmitry Petrov 1eca402332 Use correctElementType to determine array element type for withIndex
Rather unkind "gotcha" in ASM API.

 #KT-23900 Fixed Target versions 1.2.50
2018-04-23 18:00:12 +03:00
Nikolay Krasko 5817a7fdac Prevent endless processing of problem pending events
If some pending event processing caused exception in PerModulePackageCacheService,
log the problem and consider event processed. Otherwise it is going to
be stuck there forever.
2018-04-23 16:41:14 +03:00
Nikolay Krasko 00119c309c Don't call findChild on invalid file in ImplicitPackagePrefixCache 2018-04-23 16:41:14 +03:00
Nikolay Krasko 3f6022d74e Don't show several lambda return inlay hints for elvis (KT-22436)
Don't show inlay hints on binary expression operands

 #KT-22436
2018-04-23 16:41:14 +03:00
Nikolay Krasko 2a7f195bbc Fix FoldingAfterOptimizeImportsTest for case-sensitive file systems
Broken in b6699d7522
2018-04-23 16:41:13 +03:00
Nikolay Krasko d085f3e474 Don't call elementAtCaret for file usage test (fix for 181)
Fix testPropertyFileUsages test in 181.

Starting from 181, call `elementAtCaret` with zero offset returns
null element, when file starts with comment. Test fails because
of that.

https://github.com/JetBrains/intellij-community/commit/fdebc4084b9067ec19933d45a1ef2e04861206c3
2018-04-23 16:41:13 +03:00
Nikolay Krasko ffca06d8a8 Drop specific behaviour in AbstractFindUsagesTest.kt for 172
It's OK to run find usages test under progress manager.
2018-04-23 16:41:13 +03:00
Nikolay Krasko c6f8c868ce Minor: remove unused FIND_FILE_USAGES directive 2018-04-23 16:41:13 +03:00
Alexey Tsvetkov 2b4aa74c0b Add test cases for FQ-name parsing in IC 2018-04-23 15:03:42 +03:00
Leonid Startsev 01b40d4d02 Review fixes:
Use `StorageManager.createLazyValue` instead of default lazy delegate
Introduce `initialize` method instead of exposing type parameters
2018-04-23 14:39:17 +03:00
Leonid Startsev 666553e413 Add correct type parameter information to synthetic declarations
Needed by kapt due to https://github.com/Kotlin/kotlinx.serialization/issues/76
2018-04-23 14:39:17 +03:00
Alexey Tsvetkov adc3e61742 Make assertion message more readable in JPS test
The test was failing recently on CI, but assertion message
does not give enough info: arrays' sizes are not equal,
so there were extra warnings, but what they were?
2018-04-22 23:05:59 +03:00
Nicolay Mitropolsky 06e65e5f48 182: removing Spring from Kotlin-Ultimate
because all necessary functionality is already in IDEA-Ultimate
2018-04-21 11:25:49 +03:00
Mikhail Glukhikh 00a9dea7cb KotlinAbstractUElement+KotlinUElementWithComments(172): add imports 2018-04-21 11:04:13 +03:00
Ilya Gorbunov c239d346f7 Correctly indent upper bound separator in the generated stdlib code 2018-04-20 23:14:57 +03:00
Ilya Gorbunov 5381d0ed58 Move sequence operation classification higher than sample
Otherwise it gets eaten by that @sample tag.
2018-04-20 22:40:35 +03:00
Ilya Gorbunov 908d2d6975 Introduce kotlin-stdlib-generator dsl block for specifying sample reference 2018-04-20 22:40:35 +03:00
Mikhail Glukhikh 5dd7ff4d7f Up KotlinAbstractUElement / UElementWithComments / UVariable in branches 2018-04-20 21:29:55 +03:00
Mikhail Glukhikh 3e1d05f146 Update KotlinUMethod for 172/181/as32 branches 2018-04-20 21:23:05 +03:00
Pavel V. Talanov 521357a22d Add tests for KT-20824, KT-23745, KT-23124, KT-20605, KT-23760
#KT-20824 Fixed
 #KT-23745 Fixed
 #KT-23124 Fixed
 #KT-20605 Fixed
 #KT-23760 Fixed
2018-04-20 20:00:12 +02:00
Pavel V. Talanov 94fe170b7b MPP: analyze platform sources with expectedBy common sources
This allows to emulate current compiler behaviour

Introduce CombinedModuleInfo which is a combination of several other modules intended to be analyzed together
2018-04-20 20:00:11 +02:00
Pavel V. Talanov 94dfcba5c5 Minor: adjust quick fix test data to avoid "conflicting overloads" 2018-04-20 20:00:07 +02:00
Pavel V. Talanov 3949fc70c9 Adjust test data for previously ignored tests 2018-04-20 20:00:05 +02:00