Commit Graph

59417 Commits

Author SHA1 Message Date
Jiaxiang Chen 0ea407fef9 debug information test: handle vm resume correctly. 2019-11-26 14:52:58 +03:00
Toshiaki Kameyama 251899c31a Fix bad indentation when copy-paste to trimIndent()
#KT-33888 Fixed
2019-11-26 18:00:38 +07:00
Mikhail Glukhikh 178dbd3c5d Remove hacky re-initialization of PsiSubstitutor.KEY (branch 193)
After IDEA commit
https://github.com/JetBrains/intellij-community/commit/8b0af117241a074f5681fa93be74c6f1812497ba#diff-9b39aafa0a7b8d4f089100f3968931d0
this re-initialization is no more necessary. Moreover, it's harmful,
because this KEY is used as a map key in IDEA code,
and we cannot find information stored by this key.
This was a hidden reason of FIR / IR test failures in branch 193.

After this commit, FIR / IR tests in branch 193 should be fixed
2019-11-26 13:13:48 +03:00
Anton Bannykh 81699299f5 JS_IR: DCE
Could be enabled by toggling `-Xir-dce`

Box test output in js/js.translator/testData/out-min
2019-11-26 12:20:39 +03:00
Roman Golyshev faf4c05fc8 KT-34644 Give return keyword more priority in completion where appropriate
- See `returnExpressionItems::returnIsProbableInPosition` to get an idea where return is supposed to be more appropriate
  - End of the block (except for top level block of unit function or cycle) or as single expression in if or when
  - Right side of the elvis operator (which is not already in return)
- Add additional `probable_keyword` weigher to signalize about probable keyword (for now it is only for `return`)
- ^KT-34644 Fixed
2019-11-26 11:56:32 +03:00
Roman Golyshev de11b4cb64 KT-34644 Refactor CompletionUtils::returnExpressionItems
- Collecting `return` lookups to `blockBodyReturns` will later allow to modify them to increase priority in the completion
2019-11-26 11:56:19 +03:00
Pavel Kirpichenkov cf82efb49f [NI] Add missing diagnostic on callable references in fake calls
Unresolved reference diagnositc was not reported on callable references
returned from if or when expression because of additional block wrapper.

^KT-30953 Fixed
2019-11-26 11:02:25 +03:00
Mikhail Zarechenskiy eb73650209 Fix race in IDE: inject proper storage manager for type parameters
With NO_LOCKS strategy we can easily end up in a situation when
 constraint system for a generic call is built incorrectly,
 producing flaky errors (or don't produce errors at all)

 Now proper storage manager is injected for all cases except:
 - IR
 - Codegen
 - Serialization plugin
 - Fake local objects

 Most likely, NO_LOCKS strategy for these cases is fine as at that point
 the compiler works in one thread

 #KT-34786 Fixed
2019-11-26 10:52:45 +03:00
Mads Ager 399667a434 JVM_IR: Implement data class array member intrinsics. 2019-11-25 19:00:31 +01:00
Svyatoslav Kuzmich ea8ade0852 [JS] Refactor and comment for typeOf fix 2019-11-25 20:25:03 +03:00
Svyatoslav Kuzmich dc336c3c8a [JS] Add marker function getReifiedTypeParameterKType to runtime
So compiler bugs would produce a nicer error message instead of:
"TypeError: getReifiedTypeParameterKType is not a function"
2019-11-25 20:25:03 +03:00
Svyatoslav Kuzmich 600fb723f4 [JS] Fix typeOf for some reified type parameters
Fix getting kType metadata in cases when corresponding jsClass value
is passed through temporary variable.
This can happen when jsClass expression is not consided trivial by
local variable optimizer. This happens for object declarations from
different modules, for example kotlin.Unit
2019-11-25 20:25:02 +03:00
Roman Artemev c4d993d14c [KLIB] Fix top level property index. Include const properties as well. 2019-11-25 20:22:04 +03:00
Roman Artemev 1e4f8b2946 [JS IR] Do not forbid typeOf inlining if it is not required 2019-11-25 20:22:03 +03:00
Roman Artemev 2e22ddba39 [JS IR] Fix annotation constructor body generation 2019-11-25 20:22:03 +03:00
Roman Artemev c5e25a0382 [JS IR] Make PrivateMembersLowering global to handle inlined private references correctly
- Fixes [KT-33334]
2019-11-25 20:22:03 +03:00
Roman Artemev 9946feb66c [JS IR] Fix name clash between class members defined on prototype
- Fixes [KT-33327]
2019-11-25 20:22:03 +03:00
Roman Artemev 987c6ab3ee [JS IR] Roll making Char inline class back
- un/mute falling tests
2019-11-25 20:22:03 +03:00
Leonid Startsev b9ac1341ff Export generic serializer constructor from JS module
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/609
2019-11-25 20:06:15 +03:00
Leonid Startsev 73b9d2466a Do not report 'Missing @Serializable on enum with @SerialInfo' if enum
has custom serializer

#KT-34991 Fixed
2019-11-25 20:06:14 +03:00
Mads Ager 98ceee784a JVM_IR: More special bridge rewriting.
If there is an existing method that will have its argument types
remapped to boxed types, make sure to reflect that in the IR so
that code will be generated for a boxed value instead of a
primitive value.
2019-11-25 17:37:57 +03:00
Ilya Kirillov f368d9761a Fix for loop conversion when multiple initializers are present
#KT-35074 fixed
2019-11-25 17:01:46 +03:00
Ilya Chernikov b73625ad9e Switch main-kts to the updated resolvers infrastructure 2019-11-25 14:46:32 +01:00
Ilya Chernikov baec10fb40 Update apache ivy version to 2.5.0
#KT-34893 fixed
2019-11-25 14:46:32 +01:00
Ilya Chernikov 4234c5ec31 Fix ivy resolver: deps config and maven repos:
Transitive dependencies weren't fetched properly in some cases, because of the two problems:
- missing dependency configuration for the root dependency
- using URLResolver for the maven-based (IBiblio) resolvers

Also adding resolver name for easier debugging.
2019-11-25 14:46:32 +01:00
Dmitriy Novozhilov 5e5038416e Revert "tmp"
This reverts commit 3e336913
2019-11-25 16:20:06 +03:00
Dmitriy Novozhilov 3e336913b6 tmp 2019-11-25 14:44:46 +03:00
Dmitriy Novozhilov 4fc554fa9a [FIR-TEST] Add test with unresolved SAM usage of Comparator 2019-11-25 14:44:46 +03:00
Dmitriy Novozhilov 98af866417 [FIR] Fix stopping in AbstractFirUseSiteMemberScope 2019-11-25 14:44:46 +03:00
Dmitriy Novozhilov 52caa6a58d [FIR] Don't recreate type resolver in FirSpecificTypeResolverTransformer 2019-11-25 14:44:45 +03:00
Dmitriy Novozhilov 841ba6ea11 [FIR] Add generating of rawBuilder tests for light tree 2019-11-25 14:44:45 +03:00
Dmitriy Novozhilov 43e621530f [FIR] Add type parameters to FirQualifierExpression
It is needed for resolving qualifiers with type arguments
  like `Array<String>::class`
2019-11-25 14:44:44 +03:00
Victor Turansky 9330547f87 Gradle 6.0.1 support. Fix Yarn loading progress logging
Details - https://github.com/michel-kraemer/gradle-download-task/issues/143

Otherwise - no loading progress log
2019-11-25 13:00:46 +03:00
Pavel Kirpichenkov 4622041706 Update box test for unsigned to signed conversions
Updated test checks, that large unsigned numbers are converted to corresponding
negative signed numbers properly. Using unsinged constants instead of signed
in test allows to remove supressed OI error as well as use test with NI.
2019-11-25 12:22:58 +03:00
Yan Zhulanow 076166c22f Debugger: Generate line numbers for class initializers with a number on the 'init' keyword (KT-16277)
Debugger tests not absent as they use the bootstrap version of kotlinc.
Obviously, this change is not present in it yet.
2019-11-25 17:26:31 +09:00
Yan Zhulanow bebc8974b2 Report 5308947: check module validity before asking for library versions 2019-11-25 17:26:30 +09:00
Yan Zhulanow cf620cc60d Debugger: Synchronize "Add field breakpoint" dialog with the platform code 2019-11-25 17:26:30 +09:00
Yan Zhulanow 75b366fc5e EA-211653: Wrap field breakpoint dialog into a transaction guard 2019-11-25 17:26:30 +09:00
Yan Zhulanow ffeef6c18d EA-210460: Use 'safeAllLineLocations()' instead of throwing 'allLineLocations()' 2019-11-25 17:26:30 +09:00
Yan Zhulanow aaa45425da EA-210002: handle interruption in case of background inline callable searcher task 2019-11-25 17:26:30 +09:00
Yan Zhulanow 36073ef61e EA-209923: Add missing read action 2019-11-25 17:26:30 +09:00
Yan Zhulanow 69d5115b89 EA-214241: Remove worthless error reporting 2019-11-25 17:26:29 +09:00
Yan Zhulanow 16c4b0e458 EA-210823: Fix AIE in breakpoint applicability test 2019-11-25 17:26:29 +09:00
Yan Zhulanow ab06f772fc EA-209419: Fix read action requirement in Light constant evaluator 2019-11-25 17:26:29 +09:00
Yan Zhulanow 2983c87212 EA-215308: Fix unsafe check casts in template entry handling 2019-11-25 17:26:29 +09:00
Yan Zhulanow 3534d4af36 EA-215324: Fix "Module already disposed" in Scratch combo-box 2019-11-25 17:26:29 +09:00
Yan Zhulanow 3d17af0ada EA-215375: Check range, not rangeMarker with nullable 'range' inside 2019-11-25 17:26:29 +09:00
Yan Zhulanow 89bd3b8767 EA-215872: Check text range validity before 'getText(range)' 2019-11-25 17:26:28 +09:00
Yan Zhulanow 49bcb103ef EA-216005: Do not request KotlinFacetSettingsProvider for dead projects 2019-11-25 17:26:28 +09:00
Yan Zhulanow f91a84872a EA-216299: fix SIOOBE in completion 2019-11-25 17:26:28 +09:00