Commit Graph

55829 Commits

Author SHA1 Message Date
Ilya Kirillov 3926be900d New J2K: remove accidentally added println call in conversions 2019-06-26 18:36:05 +03:00
Ilya Kirillov 0dfaae2bb4 New J2K: add some tests from obsolete issues 2019-06-26 18:36:05 +03:00
Ilya Kirillov 98be5d8ed0 New J2K: add copy-paste tests for new j2k 2019-06-26 18:36:05 +03:00
Ilya Kirillov dc469cbdbf New J2K: remove incorrect modifiers in post processing 2019-06-26 18:36:05 +03:00
Ilya Kirillov 3beef2b22e New J2K: do not apply diagnostic based inspections if target element is not in the converting range 2019-06-26 18:36:05 +03:00
Ilya Kirillov 1b681a7dd6 New J2K: correctly handle empty range marker in post processings 2019-06-26 18:36:05 +03:00
Igor Yakovlev d7f28d9e19 Fix flaky tests for incorrect language version recognition
(UltraLightFacadeClassTestGenerated.testCoroutines and UltraLightClassLoadingTestGenerated.testCoroutines tests)
2019-06-26 16:32:24 +03:00
Igor Yakovlev 4c1d0678eb Remove class delegate requests from annotations and modifier lists
(#EA-144876 and #EA-144882 Fixed)
2019-06-26 16:32:24 +03:00
Igor Yakovlev 3146b12471 Fix UL inline class delegate loading for tooComplex case (#KT-31950 Fixed) 2019-06-26 16:32:24 +03:00
Sergey Igushkin 685f56e179 Fix slow AndroidSubPlugin#getCommonResDirectories, KT-29538
Replace a functionally-built file collection that filters files against
multiple original file collections upon each evaluation with a
lazy file sets intersection that is evaluated only once.

Issue #KT-29538 Fixed
2019-06-26 16:18:08 +03:00
Dmitry Petrov 991c87b9c2 Minor: remove empty JvmCoercionToUnitPatcher.kt 2019-06-26 16:16:04 +03:00
Nikolay Krasko b7c12014ee Modify dependencies for 192 branch: more dependencies to full java plugin 2019-06-26 14:11:23 +03:00
Ilya Chernikov 6ea1d92841 Implement main-kts test with command-line compiler 2019-06-26 13:01:40 +02:00
Ilya Chernikov 432d500c40 Fix custom script definition cashing and script validity check:
- reorder initialization logic, so that script definitions are
  requested only after plugins loading
- clear definitions cache after adding explicit definitions or sources

#KT-32206 fixed
#KT-32169 fixed

Note: any of these modification fix the problem alone, but the second
may prevent other similar problems, while the first fixes actual logic
of the script validity checks as well.
2019-06-26 13:01:39 +02:00
Ilya Chernikov 1b8cd9b731 Implement command-line REPL smoke test 2019-06-26 13:01:39 +02:00
Ilya Chernikov 3c1c9ca523 Fix jline proguarding in the compiler: fixes cli REPL
#KT-32085 fixed
2019-06-26 13:01:39 +02:00
Natalia Selezneva b3e08c0b61 Minor: remove debug code 2019-06-26 13:47:34 +03:00
Natalia Selezneva b503b29c51 Report exception from script definition loading to third party plugin if it's present 2019-06-26 13:47:34 +03:00
Natalia Selezneva 2fce671d0d Scripts, AsyncScripDependenciesLoader: notifyRootsChanged should return false in case when no dependencies are loaded 2019-06-26 13:47:33 +03:00
Natalia Selezneva be82979a49 Add dot before file extension at Scripting Settings Tab 2019-06-26 13:47:33 +03:00
Natalia Selezneva cccc17b139 Fix compatibility for 'com.centurylink.mdw.studio' plugin 2019-06-26 13:47:33 +03:00
Natalia Selezneva 08e599ea5b Scripts: show notification only when compilation configuration is changed 2019-06-26 13:47:32 +03:00
Natalia Selezneva fa2b9b11d6 Check classpath jars before applying script compilation result from file attributes
^KT-32061 Fixed
2019-06-26 13:47:32 +03:00
Anton Bannykh d6c10d24e1 JS IR: move inliner to common part; inline suspendCoroutineUninterceptedOrReturnJS 2019-06-26 13:13:39 +03:00
Toshiaki Kameyama e3c9134904 Add "Convert to notNull delegate" quick fix for INAPPLICABLE_LATEINIT_MODIFIER
#KT-12515 Fixed
2019-06-26 17:07:32 +07:00
Dmitry Petrov b3b7e26985 Make InsertImplicitCasts work with Descriptors and KotlinTypes again
This is a temporary change to make sure IrType infrastructure work is in
master.

It causes some of irText tests to work incorrectly (as in master).
2019-06-26 10:07:13 +03:00
Dmitry Petrov 8da5f6b955 IR: fixes after rebase 2019-06-26 09:39:17 +03:00
Dmitry Petrov 339291b01f psi2ir: update testData 2019-06-26 09:39:16 +03:00
Dmitry Petrov 7a44b0f951 IR: IrTypeOperatorCall.classifierSymbol can be computed from typeOperand 2019-06-26 09:39:16 +03:00
Dmitry Petrov 18c3778250 Minor: cleanup IrLazyProperty 2019-06-26 09:39:16 +03:00
Dmitry Petrov 1b5d077452 Minor: explicitly throw exception if declaration parent is not set 2019-06-26 09:39:16 +03:00
Dmitry Petrov 8e7ae3a996 Minor: IrTypeCheckerContext.removeExactAnnotation 2019-06-26 09:39:16 +03:00
Roman Artemev 6a82ffdc5e [JS IR BE] Make tests work 2019-06-26 09:39:16 +03:00
Dmitry Petrov 760806a1ac IR: IMPLICIT_DYNAMIC_CAST
Generate IMPLICIT_DYNAMIC_CAST for implicit casts from `dynamic` to `T`
2019-06-26 09:39:16 +03:00
Dmitry Petrov 422c13bd03 IR: add docs for IrTypeOperator's 2019-06-26 09:39:16 +03:00
Dmitry Petrov 1d9cb39915 psi2ir: fix nullability assertion generation for platform types
Incorporate PR from Steven Schäfer into IrType-based implicit cast
insertion (commit 17b925636e8717e7648c5d7b792c6ab4d18f776d).

NB this still uses originalKotlinType to determine if the type was
nullability flexible. It is somewhat error-prone and something we want
to get rid of. However, it boils down to some design questions related
to implicit null checks in Kotlin - e.g., it might be Ok to just treat
nullability flexible type `T!` as `T?` in IR, generate null checks for
all usages of type `T?` where a non-null type is expected, and later
eliminate the null checks that are redundant according to the (quite
conservative) criterion in the redundant null check elimination.
2019-06-26 09:39:16 +03:00
Dmitry Petrov ab38430ded psi2ir: irText/.../types: NI vs OI 2019-06-26 09:39:15 +03:00
Dmitry Petrov 38ad56fb78 psi2ir: Update testData for intersection type tests
Actually, IrType-based InsertImplicitCasts provides proper casts here.
2019-06-26 09:39:15 +03:00
Dmitry Petrov 3fa671943c psi2ir: coerce SAM conversion arguments to corresponding function types
Given an expression with SAM conversion, e.g.:
```
  fun test(a: Any?) {
    if (a is () -> Unit) {
      Runnable(a).run()
    }
  }
```
Here `Runnable(a)` expects `a` to be a value of functional type
`() -> Unit` (and corresponding type check makes smart cast possible).

Relation between `Runnable` and `() -> Unit` is somewhat non-trivial,
is implemented in terms of KotlinTypes and DeclarationDescriptors,
and so should be encapsulated in psi2ir if possible.
Thus, psi2ir generates IR such as
```
TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION ...
  TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST ...
    [| a |]
```
and InsertImplicitCasts knows that IMPLICIT_CAST actually might be
unnecessary (which also allows to use InsertImplicitCasts in some other
context that might require IMPLICIT_CAST rewriting, such as inlining).
2019-06-26 09:39:15 +03:00
Roman Artemev 332b191546 Fix ir type substitutor 2019-06-26 09:39:15 +03:00
Roman Artemev 7ac3f56a43 Fix InsertImplicitCasts to test isSubtypeOf 2019-06-26 09:39:15 +03:00
Roman Artemev 0c74eef500 Implement IrType context 2019-06-26 09:39:15 +03:00
Roman Artemev 3fc1419d01 [IR] Implement TypeChecker context and full isSubtypeOf/commonSuperType for IrType 2019-06-26 09:39:15 +03:00
Roman Artemev b7d098af56 [IR] Implement captureFromArguments for IrType 2019-06-26 09:39:15 +03:00
Roman Artemev d4e561baf6 [IR] Support IrType in type checker 2019-06-26 09:39:15 +03:00
Mikhail Zarechenskiy c77f18fbe6 [NI] Support callable references on qualified types with generics
#KT-32154 Fixed
2019-06-26 00:23:12 +03:00
nikita.movshin b8ccd98a17 Add changelog for 1.3.40 2019-06-25 19:33:10 +03:00
Pavel Punegov e9aec54f59 Ignore test in native because it doesn't support 40 parameters 2019-06-25 19:12:41 +03:00
Ilmir Usmanov 0ada383281 Move addFunctionOverride to AddContinuationLowering 2019-06-25 16:30:02 +03:00
Ilmir Usmanov c613e04962 Do not try to create view of suspend function descriptor on IR BE
Keep container source in wrapped descriptor
2019-06-25 16:30:02 +03:00