Commit Graph

70195 Commits

Author SHA1 Message Date
Ilya Muradyan cb020fb9f4 Change repository adding logic
Now if the repo being added already exists, it is moved to the
end of the list, effectively lowering its priority.

Original issue: https://github.com/Kotlin/kotlin-jupyter/issues/107
2020-10-23 13:31:38 +03:00
Ilya Goncharov 7062bf5737 [JS_IR] Additional check on loop label to not persist name for labeled loop
^KT-42262 fixed
2020-10-23 13:16:03 +03:00
Igor Chevdar 1a9e516dc0 [ir-plugin] Referenced binary operators with the new API 2020-10-23 14:58:33 +05:00
Igor Chevdar 23d12a717e [box-tests] Added a test 2020-10-23 14:22:48 +05:00
Igor Chevdar 27aed0ccbc [IR] Inliner: erase non-reified parameters for casts
Fixes https://youtrack.jetbrains.com/issue/KT-31072
2020-10-23 14:22:09 +05:00
Kristoffer Andersen 27fb46712a [JVM+IR] Unify new debugger tests expectations
This commit unifies the expectation format between the stepping and
LVT tests in the new debugging test harness.

Furthermore, it introduces a compression of runs of locations without
linenumbers. These default to showing as bytecode offsets from
previous line number, which overspecifies the tests: the bytecodes
chosen should not be constrained by a debugging step test.
2020-10-23 11:19:58 +02:00
pyos e19ecdfb3d [Tests] Suspend Codegen Tests Improvements
This commit enables the execution of suspend box tests in a separate
test. It's a QoL improvement in the existing bb tests but, motivating
these changes, enables the new debugger stepping tests to step
coroutine code.
2020-10-23 11:19:58 +02:00
Kristoffer Andersen 3291f8455b [JVM+IR] Update straight-forward LVT tests 2020-10-23 11:19:58 +02:00
Kristoffer Andersen 2c9bf95227 [JVM+IR] New LVT debugging test harness improvements
This is the first step in a push to improve the test coverage of the
IR debugging experience. This commit improves on the sketch of local
variable table tests built on the new debugger stepping
infrastructure. As improvements on the existing
checkLocalVariableTableTest they:
 - don't overspecify codegen strategy: no hard requirements on slots.
 - test the observed lifespans of locals by stepping through code.

Ultimately this should enable us to bring over all existing tests for
improved coverage of both old and new JVM backends.

WIP list:
 - Gracefully handle absent LVT: treat as empty Add type of local and
 - type of value stored there to expectations Print values in local
 - slots if primitive or java.lang.String Enable specifying
 - expectations per backend Gracefully handle absent box methods
 - Gracefully handle null values in slots of reference type
 - Port a first LVT test
2020-10-23 11:19:58 +02:00
Ilya Goncharov 4479bf0933 [JS_IR] Enum constructor copy parameters with mapping by index
Previously mapping was by name, and there was clash in case of user
parameters named 'name' or 'ordinal'

^KT-39186 fixed
2020-10-23 11:42:43 +03:00
Vladimir Dolzhenko 2790bc1105 Split perf test json reports in a separate files/docs 2020-10-23 09:11:05 +02:00
Vladimir Dolzhenko d7a783e077 Add prefix for inner test classes 2020-10-23 09:11:05 +02:00
Yan Zhulanow 58f606e1f5 Minor: Import DebuggerUtils 2020-10-23 15:46:54 +09:00
Yan Zhulanow 55e36fa1ab Minor: Use second pattern argument instead of explicit callee.text 2020-10-23 15:46:54 +09:00
Toshiaki Kameyama 5095caee50 IfThenToSafeAccessInspection: fix it works correctly for variable/operator call
#KT-30513 Fixed
#KT-17071 Fixed
2020-10-23 15:46:54 +09:00
Yan Zhulanow 871ad2b909 Minor: Remove hard-coded 'Companion' name 2020-10-23 15:46:53 +09:00
Toshiaki Kameyama 15a615d63b Add quick fix for 'JAVA_CLASS_ON_COMPANION'
#KT-29264 Fixed
2020-10-23 15:46:53 +09:00
Toshiaki Kameyama d61158a176 "Use destructuring declaration": fix it works correctly if variable name is shadowed
#KT-30601 Fixed
#KT-20570 Fixed
2020-10-23 15:46:53 +09:00
Toshiaki Kameyama f4b9c4777f RemoveBracesIntention: add new line for long expression
#KT-30523 Fixed
2020-10-23 15:46:52 +09:00
Toshiaki Kameyama 731848849e Convert to range check: don't report it if recursive call will be created
#KT-39182 Fixed
2020-10-23 15:46:52 +09:00
Toshiaki Kameyama 03e725d5da "Add parameter to function" for TYPE_MISMATCH: fix it works correctly for extension function
#KT-39557
2020-10-23 15:46:52 +09:00
Yan Zhulanow 6515d53b94 Minor: update order in IntentionTestGenerated 2020-10-23 15:46:52 +09:00
Yan Zhulanow f2dc132d5d KT-23394: Add a test with a property 2020-10-23 15:46:51 +09:00
Toshiaki Kameyama cdf7f46ce1 Provide quickfix for specifying type of variable initialized with null
#KT-23394 Fixed
2020-10-23 15:46:51 +09:00
Yan Zhulanow 55038e19ec Minor: Extract lambda return expression handling 2020-10-23 15:46:51 +09:00
Toshiaki Kameyama f76e98868c "Change to return with label" quick fix: apply for type mismatch
#KT-32280 Fixed
2020-10-23 15:46:51 +09:00
Yan Zhulanow 016e78e483 Refactoring: Remove hard-coded augmented assignment check with a Name check 2020-10-23 15:46:50 +09:00
Toshiaki Kameyama 73e319ca7a Replace with ordinary assignment: do not suggest when operator is augmented assignment operator function
#KT-34715 Fixed
2020-10-23 15:46:50 +09:00
Toshiaki Kameyama 55d55446c8 Redundant companion reference: do not report 'values/valueOf' function in enum
#KT-34285 Fixed
2020-10-23 15:46:50 +09:00
Yan Zhulanow 2a841550d4 Additional minor fixes for KT-33594: avoid using hard-coded annotation name, simplify hasAnnotationToSuppressDeprecation() 2020-10-23 15:46:50 +09:00
Toshiaki Kameyama cf5a6274e2 "Code Cleanup": don't remove deprecated imports when file has @file:Suppress("DEPRECATION") annotation
#KT-33594 Fixed
2020-10-23 15:46:49 +09:00
Toshiaki Kameyama 4a328981c6 "Put/Join arguments/parameters" intention: don't suggest on nested argument list
#KT-31020 Fixed
2020-10-23 15:46:49 +09:00
Toshiaki Kameyama be194c3460 ReplaceWith: suggest for "invoke" extension
#KT-8597 Fixed
2020-10-23 15:46:49 +09:00
Toshiaki Kameyama bb7d4c224f FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable
#KT-38349 Fixed
2020-10-23 15:46:48 +09:00
Yan Zhulanow 3e632d074e Enable Parcelize IDE plugin in Android Studio 4.2 (KT-42859)
It turned out that all extensions related to the Parcelize IDE plugin are disabled in Android Studio 4.2. The missing inclusion seemingly happened because of a rebase mistake. This commit returns the missing inclusion back.
2020-10-23 15:46:48 +09:00
Mikhail Glukhikh 47a4bd1701 [FIR Java] Look into type arguments during dependent type parameter search 2020-10-23 08:12:17 +03:00
Mikhail Glukhikh 7f3d0af4f7 [FIR Java] Soften rules for matching types for may-be-special-builtins
This commit is workaround for cases like
MyJavaMap<KK : Bound, V> : java.util.Map<K, V>.
After signature changing and substitution we have
MyJavaMap.get(Object) declared and MyJavaMap.get(KK) from supertype,
which can't be otherwise matched as overriding one another.
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh 81529a835b Drop FirAbstractOverrideChecker.isEqualTypes 2020-10-23 08:12:16 +03:00
Mikhail Glukhikh abc2866902 [FIR] Fold flexible types after substitution if possible 2020-10-23 08:12:16 +03:00
Mikhail Glukhikh acb03cb28c [FIR2IR] Expand type during super qualifier search 2020-10-23 08:12:16 +03:00
Mikhail Glukhikh c50aa5f2ec [FIR TEST] Bad test data changes due to Java signature transformation
Both changes are related to getOrDefault. We should either make Java
version low priority or remove it at all.
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh d3e85dbce0 [FIR] Implement replacing Object with type parameters for specials builtins
#KT-42601 Fixed
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh d40248cb53 [FIR] Extract computeJvmDescriptorReplacingKotlinToJava 2020-10-23 08:12:15 +03:00
Mikhail Glukhikh f866eff93e Extract special generic signatures to compiler.common.jvm to reuse in FIR 2020-10-23 08:12:15 +03:00
Mikhail Glukhikh 0e7acd6e8b [FIR Java] Add better type parameter erasure for override matching
Around KT-42601
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh 17de486c23 [FIR Java] Drop nasty code providing type parameter erasure 2020-10-23 08:12:14 +03:00
Alexander Likhachev 999627952a [Gradle, K/N] Add proper assumptions for Mac only integration tests 2020-10-23 05:41:08 +03:00
Alexander Likhachev ac7b7abcc0 [Gradle, JS] Fix K/JS project build with configuration cache (part 3)
Now configuration cache enabled builds with JS tasks does not fails but prints warning and skips execution on subsequent builds.
Relates to KT-42494
2020-10-23 05:41:07 +03:00
Igor Yakovlev 97d39c102a Fix BWC for Search utils 2020-10-22 19:32:18 +03:00
Andrei Klunnyi 71023cd596 [KT-40688] Inlay Hints: inlay hints are duplicated on code editing
Code editing changes inlay hints offset.
InlayModel.getAfterLineEndElementsInRange(int, int) call didn't return
previously existed hint by its "outdated" offset. From now on hints are
taken by logical line.
2020-10-22 18:22:51 +02:00