Commit Graph

47500 Commits

Author SHA1 Message Date
Mikhael Bogdanov c19d45a2fc Initial lazy ir implementation 2018-08-01 12:29:25 +02:00
Mikhael Bogdanov 2884d728fd Mute/unmute jvm_ir tests 2018-08-01 12:29:24 +02:00
Mikhael Bogdanov 74aa8f054e Fix type parameters count in synthetic accessor lowering 2018-08-01 12:27:08 +02:00
Dmitry Petrov 60d93aee87 Drop IrProperty.typeParameters 2018-08-01 12:06:41 +03:00
Roman Artemev c9b7db646c Temporary mute test with issue between coroutines and crossinline 2018-08-01 10:56:08 +03:00
Roman Artemev dac1fac957 Unmute working test 2018-08-01 10:55:21 +03:00
Vyacheslav Gerasimov 2ec7c4fd0d Update platform versions for 181, 182, as32, as33 plugins 2018-07-31 19:27:23 +03:00
Pavel V. Talanov e1a27929ac Do not throw on using kotlin resolve via light classes in dumb mode
Fix an exception when kotlin resolve was invoked when searching
    for tests while indexing (probably many other cases)
Does not actually fix the behaviour, the test will not be found
    resulting in undesired behaviour
Full-blown infrastructure for resolving Kotlin in dumb mode is needed
    to fix the behaviour

 #KT-24979 Fixed
2018-07-31 14:47:21 +02:00
Dmitry Petrov ea710ce607 IrField.isStatic: Update testData for new test 2018-07-31 14:04:04 +03:00
Dmitry Petrov 6dfcf15a39 IR: IrField.isStatic 2018-07-31 13:39:54 +03:00
Zalim Bashorov 8d97512179 [JS IR BE] Improve diagnostics in tests 2018-07-31 11:28:39 +03:00
Zalim Bashorov 2fb286e39c [JS IR BE] Update tests 2018-07-31 11:28:39 +03:00
Zalim Bashorov 0da14e4189 [JS IR BE] Support calls, property accesses and most of operators on expressions with dynamic type 2018-07-31 11:28:38 +03:00
Zalim Bashorov 4a7ecaa908 [JS IR BE] Add basic support for external declarations 2018-07-31 11:28:38 +03:00
Zalim Bashorov 3c0d0d2ab4 [JS IR BE] Move external declarations to a separate IrPackageFragment to not generate code for them 2018-07-31 11:28:38 +03:00
Zalim Bashorov c66bb8c57d [JS IR BE] Remove no longer needed descriptor based utils 2018-07-31 11:28:38 +03:00
Zalim Bashorov 990ad8719d [JS IR BE] Run each lowering on all files instead of running all lowering on each file 2018-07-31 11:28:38 +03:00
Lucas Smaira 49292cd26c Move model interfaces code from Java to Kotlin 2018-07-30 19:08:04 +03:00
Lucas Smaira 52990c9eb1 Set JAVA and ANDROID_HOME when fetching Gradle models
In BaseGradleIT
2018-07-30 19:08:04 +03:00
Lucas Smaira 8cb03fcdec Fix model tests in Windows
By comparing files instead of paths, avoiding problems with separator
'/' or '\'.
2018-07-30 19:08:04 +03:00
Lucas Smaira 5e515590cb Restrict methos in Tasks.kt to internal 2018-07-30 19:08:04 +03:00
Lucas Smaira 3588547d8c Remove *ImplTest for Kotlin Gradle Models
Equality should already be guaranteed by Kotlin data classes.
2018-07-30 19:08:04 +03:00
Lucas Smaira 3c88f761a6 Introduce tooling model for Android extensions plugin
Introduce Gradle models for plugins 'kotlin-android-extensions'.
2018-07-30 19:08:04 +03:00
Lucas Smaira 5a423e8dcd Introduce tooling model for annotation based projects
Introduce Gradle models for plugins 'kotlin-allopen', 'kotlin-noarg' and
'kotlin-sam-with-receiver'. Corresponding model builders are registered
in each one of those plugin main classes.
2018-07-30 19:08:04 +03:00
Lucas Smaira 5671dbb929 Introduce tooling model for Kapt gradle projects
A Kapt model for Gradle projects including 'kotlin-kapt'plugin is
introduced. Its model builder KaptModelBuilder produces an
implementation of these models and can be queried through the Gradle
Tooling API when needed. Model builder is registered in
Kapt3GradleSubplugin.
2018-07-30 19:08:04 +03:00
Lucas Smaira 9def6f020f Introduce tooling model for Kotlin gradle projects
A KotlinProject model for Gradle projects including Kotlin (JVM, JS or
common) plugins is introduced. Its model builder KotlinModelBuilder
produces an implementation of these models and can be queried through
the Gradle Tooling API when needed. Model builder is registered in the
corresponding Kotlin Gradle plugins.

Model definition should be published as a separate artifact in public
repositories so it can be consumed when needed.
2018-07-30 19:08:04 +03:00
Ilmir Usmanov 4b03db771a Minor. Fix test. 2018-07-30 18:59:44 +03:00
Mikhail Zarechenskiy acd5b62148 Introduce limited constant conversions for Kotlin/Native
#KT-25320 Fixed
2018-07-29 04:32:32 +03:00
Alexander Udalov 1a51132884 Add CLI tests on internal from other module (JVM, JS, common) 2018-07-27 18:51:42 +02:00
Alexander Udalov 4bd66d5aa8 Add compiler argument -Xfriend-paths for kotlinc-jvm
#KT-21910 Fixed
2018-07-27 18:51:42 +02:00
Dmitry Savvinov 8edbb10420 Fix typo introduced in f90b29c2e3 2018-07-27 18:55:52 +03:00
Dmitry Savvinov f90b29c2e3 Support contracts in PartialBodyResolveFilter
Previously, PartialBodyResolveFilter didn't know about contracts and was
filtering out calls of such functions, leading to unstable completion in
cases like that:

fun test(x: Any?) {
    require(x is String)
    x.<caret>
}

However, PartialBodyResolveFilter works by pure PSI, while to determine
if function has a contract we have to resolve it.

To solve it, we do something very similar to what has been done with
Nothin-returning functions: introduce
KotlinProbablyContractedFunctionShortNameIndex, which collects all
function which *may* have a contract during indexing.

^KT-25275 Fixed
2018-07-27 16:59:24 +03:00
Dmitry Savvinov 5ab79a111d Introduce 'mayHaveContract'-flag in stubs
This is needed for further commit, which supports contracts-based
smartcasts in partial body resolve mode.

NB: Stubs can be built from 3 sources:
- source code (contract presence can be checked by PSI)
- binary data (contract presence can be checked by Kotlin Metadata)
- decompiled sources

The last case is a bit of a headache, because usually bodies are omitted
in decompiled sources. To workaround it, we have to inject stubbed
contract-call in the body.
2018-07-27 16:59:24 +03:00
Dmitry Savvinov 24245c2245 Support compiler test directives in PartialBodyResolve tests 2018-07-27 16:59:23 +03:00
Dmitry Savvinov ca64346b55 Add compiler test directives to the list of valid directives 2018-07-27 16:59:23 +03:00
Dmitry Savvinov 2a57807c85 Minor: reformat and clean-up KotlinFixtureCompletionBaseTestCase 2018-07-27 16:59:23 +03:00
Dmitry Savvinov 099fc0ad51 Push compiler options from test directives into project-wide settings
This may be useful if we want to configure how we read binaries
2018-07-27 16:59:23 +03:00
Dmitry Savvinov 724b7bf363 Minor: rename and refactor contract-related PSI checks in ktPsiUtil 2018-07-27 16:59:23 +03:00
Dmitry Savvinov b943140f3a Move purely PSI checks of contract presence to ktPsiUtil.kt 2018-07-27 16:59:23 +03:00
Alexey Sedunov 5275e19c76 Move: Do not consider type alias -> expect class change as a conflict
Given they have the same fqname

 #KT-23594 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov 1c30a12d95 Move: Account for implemented modules in internal access check
#KT-23590 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov 0406d61622 Rename: Update filenames within expect/actual set (when necessary)
#KT-23772 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov d586a84f31 Configuration: Include test roots of dependent modules to the module scope
#KT-23914 Fixed
2018-07-27 16:08:13 +03:00
Alexey Sedunov 04500914f3 Misc: Update Kotlin Gradle script icons for IDEA 182
#KT-25356 Fixed
2018-07-27 16:08:12 +03:00
Dmitry Petrov 893e19e9f8 StrictJavaNullabilityAssertions is enabled since 1.3
https://youtrack.jetbrains.com/issue/KT-20830#focus=streamItem-27-2670071-0-0
2018-07-27 09:52:29 +03:00
Dmitry Petrov 566b5856ec Constructor call normalization mode depends on language version 2018-07-27 09:52:29 +03:00
Roman Artemev 14b1f0ef6a Fix issue #KT-24475
* count coroutine metadata references during RemoveUnusedImport pass in JsInliner
* add cases to test usage of stdlib symbols in inlined functions
2018-07-26 19:23:06 +03:00
Anton Bannykh 75c7045ea7 JS: fix bug in resolveTemporaryNames.kt 2018-07-26 18:23:20 +03:00
Alexander Udalov 3323fd5a11 Check "kotlin" package usage when compiling common code
#KT-25369 Fixed
2018-07-26 17:10:33 +02:00
Mikhail Glukhikh ddd3a0a46e Implement liftToExpected correctly for primary constructor properties
Before this commit, we always tried to find expect property in this case.
However, there is at least one case when we should find parameter of
expect primary constructor instead (safe delete).
So #KT-25321 Fixed
2018-07-26 18:01:42 +03:00