Commit Graph

55438 Commits

Author SHA1 Message Date
Sergey Rostov 560f34bde5 Gradle, JS, webpack: add dependency to compile classpath 2019-06-08 20:36:09 +03:00
Sergey Rostov 354bf1f308 Gradle, JS, run: don't add dependency from project run task
As js webpack-dev-server will not finish
2019-06-08 20:36:09 +03:00
Sergey Rostov 45d4a9d67c Gradle, js: rename objects to avoid clashing with moowork nodejs plugin
#KT-31834 Fixed
2019-06-08 20:36:09 +03:00
Sergey Rostov b5515a31eb Gradle, js, karma: useConfigDirectory DSL
#KT-31686 Fixed
2019-06-08 20:36:08 +03:00
Vyacheslav Gerasimov 5bde9720b7 Build: Fix dependencies on :kotlin-compiler project
Dependencies on :kotlin-compiler should never be used in configurations
which are imported transitively because ide fails to import it as
project dependency. When :kotlin-compiler dependency is imported as
kotlin-compiler.jar dependency ide re-indexes it on every change. This
behaviour is super annoying.

 #KT-31120 Fixed
2019-06-08 19:36:28 +03:00
Ilya Chernikov c39896165e Fix script compiler options processing 2019-06-07 23:19:16 +02:00
Alexey Tsvetkov 38a692abcf Add experimental support for bytecode instrumentation with JPS
#KT-13563 Fixed
2019-06-07 21:06:25 +03:00
Igor Yakovlev 545fdb5a37 Add UL-inline class overrided interface methods 2019-06-07 20:33:07 +03:00
Igor Yakovlev 7d542eda00 Fix UL classes test for inline classes support 2019-06-07 20:33:07 +03:00
Igor Yakovlev 44f19e1225 Add UL support for classes 2019-06-07 20:33:07 +03:00
Mikhail Zarechenskiy b7849da19e [NI] Introduce flag to change constraint system for overload resolution
This commit doesn't change behaviour of any inference algorithm, it
 introduces opportunity to switch constraint system that is used for
 overload resolution and fix problematic cases by changing one enum
 entry.

 Due to fundamental changes, there are cases where a new inference
 algorithm reports overload resolution ambiguity errors (#KT-31670,
 #KT-31758), which is correct from its point of view. However, this is
 a breaking change and to really make it, we should be very confident
 and have enough motivation for it, therefore, we don't change behavior
 now in order to collect more examples (if there are any). And if we
 find a lot of erroneous examples, we'll be able to change the behavior
 quite simply
2019-06-07 18:38:00 +03:00
Mikhail Zarechenskiy e7064f5b77 [NI] Move creation of constraint system under callbacks
This will be needed in the next commit to have access to constraint
 system that is used for old inference
2019-06-07 18:37:18 +03:00
Igor Yakovlev ada41fb23f Add copy method to KtUltraLightSuspendContinuationParameter 2019-06-07 17:54:03 +03:00
Igor Yakovlev 2a1293e3ef Fix test data for UL suspend declatations
(remove should-load-cls flag)
2019-06-07 17:54:03 +03:00
Igor Yakovlev 63d7e479c6 Fix invalid nullability annotation for suspend functions in LightClasses 2019-06-07 17:54:03 +03:00
Igor Yakovlev d005dc685f Add nullability support to KtUltraLightSuspendContinuationParameter 2019-06-07 17:54:03 +03:00
Igor Yakovlev 0d51a2ec43 Optimize for void return type for functions with no return type
+ small refacroring
2019-06-07 17:54:03 +03:00
Igor Yakovlev 9e904598fb Add coroutines as parameters 2019-06-07 17:54:03 +03:00
Igor Yakovlev fc30e564ba Add support ultra light suspend functions declarations 2019-06-07 17:54:03 +03:00
Vyacheslav Gerasimov 16b9c15133 Build: Don't run checkBuild tasks on check, add checkBuild to buildSrc 2019-06-07 17:38:16 +03:00
Vyacheslav Gerasimov 2769dc8359 Build: Improve sourcesJar helper
- Add sources from embedded projects
 - Add artifact to sources configuration
 - Use register instead of create

 #KT-30237 Fixed
2019-06-07 17:37:46 +03:00
Vyacheslav Gerasimov 547b10ee29 Build: Write ivy.xml without usage of internal gradle apis 2019-06-07 17:37:39 +03:00
Alexander Udalov bbbd47ead3 Minor, rename codegen test 2019-06-07 15:01:44 +02:00
Alexander Podkhalyuzin ea86ebf995 Do not expect that KDoc reference contains importable fqName
#KT-31768 Fixed
2019-06-07 15:25:15 +03:00
Mads Ager 71604851fe JVM_IR: Allow delegated companion objects.
This currently leads to a compilation error due to metadata
generation.
2019-06-07 13:26:20 +02:00
Mikhail Zarechenskiy 4ddd9f081b [NI] Consider explicitly specified type argument as an input type
#KT-31860 Fixed
2019-06-07 12:31:42 +03:00
Mikhail Zarechenskiy 787a8bb9bd Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
This reverts commit 7c4101e21c.

 #KT-31866 Fixed
 #KT-31868 Fixed
 #EA-125401 Fixed
 #KT-25290 Open
2019-06-07 12:31:38 +03:00
Dmitry Gridin f48640f91c Fix test for UnsafeCastFromDynamicInspection 2019-06-07 12:23:55 +07:00
Dmitry Gridin 8eb11d9d3d Fix some tests 2019-06-07 12:23:54 +07:00
Dmitry Gridin 4f8c0653c5 Change API in AbstractApplicabilityBasedInspection
Replace all inspectionTarget with inspectionHighlightRangeInElement & change type of element in applyTo from PsiElement to TElement
2019-06-07 12:23:54 +07:00
Dmitry Gridin 1ad7a50087 IfThenToElvis & FoldInitializerAndIfToElvis should add new line for long expression
Relates to #KT-19643 #KT-16067
2019-06-07 12:23:54 +07:00
Dmitry Gridin 9c1ff75efc Minor: change highlight range for '...ToElvis' & '...ToSafeAccess' inspections
New range: from `if` keyword to right parenthesis
Relates to #KT-19643 #KT-16067
2019-06-07 12:23:54 +07:00
Dmitry Gridin 984c781588 FoldInitializerAndIfToElvisInspection: decrease severity level to INFORMATION for is
#KT-19643 Fixed
2019-06-07 12:23:54 +07:00
Dmitry Gridin b3fe830b6e Fix false positive "Foldable if-then" with Result type
#KT-27074 Fixed
2019-06-07 12:23:54 +07:00
Dmitry Gridin f2accb7b9e Convert IfThenToElvisIntention to inspection & decrease severity to INFO
#KT-16067 Fixed
2019-06-07 12:23:54 +07:00
Dmitry Gridin d8f32b1a0c Cleanup J2KPostProcessingRegistrarImpl 2019-06-07 12:23:54 +07:00
Dmitry Gridin b4949a1683 Cleanup branchedTransformations & update copyright 2019-06-07 12:23:54 +07:00
Dmitry Gridin 74c177fd26 Convert FoldInitializerAndIfToElvisIntention to inspection and decrease severity to INFO
#KT-19643 Fixed
2019-06-07 12:23:54 +07:00
Dmitry Gridin 8b0b135112 Add new line after modifier list if last child is comment
#KT-30804 Fixed
2019-06-07 12:23:06 +07:00
Alexander Udalov fec9ee6408 Minor, add kdoc for typeOf 2019-06-07 00:29:35 +02:00
Mikhail Zarechenskiy 42b7552d17 Fix exception on attempt to map inner non-fixed type variable
#KT-31842 Fixed
2019-06-07 01:18:47 +03:00
Ilya Chernikov e542c9ea84 Refactor script definitions and resolving/refining infrastructure:
- implement wrappers to wrap old and new API providers and resolvers
- make old API deprecated (with error where possible)
- drop old internal classes related to the old API
- refactor usages accordingly
- fix and add missing features to the scripting API where necessary
2019-06-06 17:21:00 +02:00
Ilya Chernikov e5054f9648 Refactoring scripting infrastructure:
- add a helper for new constructing Compilation Configuration only when necessary
- add more converters for legacy diagnostics
- add helpers for simpler creating of failure results
2019-06-06 17:21:00 +02:00
Ilya Chernikov b7fd898bb8 Add explicit return types to helpers
also workarounds a problem (KT-30297) with new inference
2019-06-06 17:21:00 +02:00
Ilya Chernikov 4fb2f81134 Refactor scripting - prepare utilities for refactoring of the script definitions handling 2019-06-06 17:20:59 +02:00
Andrey Uskov 5efd55f530 Fix memory leak on project reimport
#KT-31843 Fixed
2019-06-06 17:11:07 +03:00
Ting-Yuan Huang a447c748bc JVM_IR: support @JvmDefaults in compatibility mode. 2019-06-06 14:10:28 +02:00
Toshiaki Kameyama 1c32941949 Use property access syntax: don't report when setter argument is lambda
#KT-30627 Fixed
2019-06-06 18:53:15 +07:00
Sergey Rostov a3f8987255 JPS Build: fix importing artifacts
For some reason, gradle.projectsEvaluated callback evaluates after IDEA
import script gathers all project models. So, all jps related project
settings (including artifacts configurations) won't be imported.

We need only :prepare:idea-plugin evaluated. So replacing
gradle.projectsEvaluated to root Project.afterEvaluate and
 forcing evaluation of :prepare:idea-plugin fixes the problem.
2019-06-06 11:00:58 +03:00
Sergey Rostov 8995d89599 Gradle, js, karma: don't run karma if no browsers configured
#KT-31662 Fixed
2019-06-06 09:15:40 +03:00