Commit Graph

57948 Commits

Author SHA1 Message Date
Denis Zharkov 67410f7a57 Parametrize behavior of DescriptorEquivalenceForOverrides::areCallableDescriptorsEquivalent
The changes introduced 471134d31e are only needed
for the case of HMPP project while for other cases it might break the behavior
a bit like in KT-34027

See org.jetbrains.kotlin.resolve.calls.results.OverloadingConflictResolver#filterOutEquivalentCalls

Before 471134d we were comparing
"fun foo(x: String)" with "[substituted] fun foo(x: String)"
and areCallableDescriptorsEquivalent returned false for such case.
Thus, both overrides were left in the resulting set.

After 471134d, those two descriptors
becamed considered as equal thus having a possibility to remove any of them.

The problem is that "areCallableDescriptorsEquivalent" has kind of
unclear contract. Effectively it checks whether two descriptors match
to the same declaration

But straightforward fixing of this exact call-site (using original descriptors)
doesn't help: behavior might change in a very subtle way (see org.jetbrains.kotlin.spec.checkers.DiagnosticsTestSpecGenerated.NotLinked.Dfa.Pos#test72)

So, the main idea is changing the contract for areCallableDescriptorsEquivalent
only when project is HMPP one.

^KT-34027 In Progress
2019-09-30 20:09:42 +03:00
Ilmir Usmanov 08794d17a0 Do not box function argument if it is used in EXACTLY_ONCE lambda
Since we cannot change type of parameter, we cannot replace it with
box type.
 #KT-29510 Fixed
 #KT-29614 Fixed
 #KT-29385 Fixed
2019-09-30 17:42:17 +03:00
Ilya Goncharov c5ba19451f Fix leading zero for percents less than 10
- To avoid status text jumping
2019-09-30 16:53:25 +03:00
Ilya Goncharov 305b6091cd Consider, that ':' can be in file path (Windows case)
#KT-31478 fixed
2019-09-30 16:53:24 +03:00
Ilya Goncharov 923ecaf6b9 Fix js quoted strings for Windows 2019-09-30 16:50:42 +03:00
Ilya Goncharov 842cbf51c9 Assign of revertMethods instead of copying 2019-09-30 16:50:42 +03:00
Ilya Goncharov 9a5f937f2d Fix progress percentage 2019-09-30 16:50:42 +03:00
Ilya Goncharov 71963de70c Move revertible methods to finally 2019-09-30 16:50:42 +03:00
Ilya Goncharov 7680c21fb6 Print parsed stack trace 2019-09-30 16:50:42 +03:00
Ilya Goncharov e911e0acbb Only parsed stacktrace consider
- NodeJs and Karma testing logging, exception handling and source maps works consistently
2019-09-30 16:50:42 +03:00
Ilya Goncharov 2ac24efc8b Process stack trace for karma 2019-09-30 16:50:42 +03:00
Ilya Goncharov 7010c03706 Move Karma Kotlin reporter to kotlin-test-js-runner 2019-09-30 16:50:42 +03:00
Ilya Goncharov fa4f39f5eb Use own format error for source maps processing in karma reporter 2019-09-30 16:50:42 +03:00
Ilya Goncharov 9f64c426e5 Parse stack trace for extract original sources 2019-09-30 16:50:41 +03:00
Ilya Goncharov a5c8882ccb Format error for teamcity log reporter
- formatError contains source map processing
2019-09-30 16:50:41 +03:00
Ilya Goncharov efe8c2fa7c Remove redundant karma-source-map-support 2019-09-30 16:50:41 +03:00
Ilya Goncharov 36d9fe5a3a Add process stack trace for failing tests 2019-09-30 16:50:41 +03:00
Ilya Goncharov 3ca3842c3f Fix format 2019-09-30 16:50:41 +03:00
Ilya Goncharov fb97375f86 Remove redundant debug flag for karma start 2019-09-30 16:50:41 +03:00
Ilya Goncharov b22e56e1ba Fix IE karma alias 2019-09-30 16:50:41 +03:00
Ilya Goncharov bbe51469ee Add devtool property for webpack
- Use inline-source-map for karma-webpack
2019-09-30 16:50:41 +03:00
Sergey Rostov 4c579f5286 build.gradle.kts: collect statistics about auto reload, fix 183 as as34 2019-09-30 14:08:43 +03:00
Nikolay Krasko 552408e887 Minor: update test data for quick doc with deprecated annotation 2019-09-30 13:38:27 +03:00
Nikolay Krasko 2ec231f381 Minor: fix CompletionMultiFileHandlerTest test 2019-09-30 13:38:27 +03:00
Nikolay Krasko 751a18e64b Minor: update test data PartialBodyResolveTestGenerated 2019-09-30 13:38:26 +03:00
Natalia Selezneva 064689b6b7 Merge pull request #2467 from t-kameyama/KT-14756
KT-14756 Move statement down breaks code in argument list
2019-09-30 13:19:07 +03:00
Mikhail Zarechenskiy 932d84d568 Fix performance regression in NI by fixing totally incorrect hashCode
The actual problem was introduced in 4f1e85b468, note how `hashCode` is implemented:
```
var currentHashCode = cachedHashCode
if (currentHashCode == 0) return currentHashCode
...
```
It's a silly bug, there should be check `if (currentHashCode != 0) ...` because `0` is used a marker for "uncomputed value".

Now, in the commit 0219b86d06 I added map with `KotlinType` as a key and because of constant `hash` for `KotlinType`, we basically got `List` instead of `Map`, which caused this performance regression

 #KT-34063 Fixed
2019-09-30 10:22:30 +03:00
Mikhail Zarechenskiy 957af741cd [NI] Don't forget marker interface for type variables 2019-09-30 10:22:30 +03:00
Natalia Selezneva 66a6713577 Tests: extract scripts testdata for light classes in ide to separate test
For compiled scripts there is AbstractIdeCompiledLightClassTest
For now there is a difference in light classes constructed from source and from compiled class (missing baseClass and constructor parameter for script class)
But it doesn't affect users because calling script class from Java isn't supported yet

testData for AbstractIdeLightClassTest and AbstractIdeLightClassForScriptTest can be merged when the difference will be fixed
2019-09-30 09:47:20 +03:00
Sergey Rostov 46f8feaf98 build.gradle.kts: collect statistics about auto reload 2019-09-30 09:44:52 +03:00
Alexey Tsvetkov 6c90279694 Ensure all output roots exist after Kotlin is compiled in JPS 2019-09-30 09:03:49 +03:00
Nikolay Krasko 1804619076 Fix AmbiguousCalls test in 192 2019-09-30 00:53:03 +03:00
Nikolay Krasko 7e691a0864 Store project to avoid creating psi factory from invalid element
Fix ConvertLineCommentToBlockCommentIntention tests
2019-09-30 00:53:03 +03:00
Nikolay Krasko 057c16bf10 Allow to mute and assert special failure for generated tests 2019-09-30 00:53:03 +03:00
Nikolay Krasko 319cabcc88 Remove deprecated InjectorUtils#putInjectedFileUserData in injection (KT-33775)
#KT-33775 Fixed
2019-09-30 00:53:03 +03:00
Ilya Kirillov f70654d16b Fix CreateTypeParameter quick fix tests
Partially reset 21429f0b94
2019-09-29 20:43:19 +03:00
Ilya Kirillov 04515eda3d Fix nj2k module compilation for 191 & 183 branches 2019-09-29 18:45:48 +03:00
Ilya Kirillov 2ace905429 Fix IndexOutOfBoundsException (EA-211554) in SerializationPluginDeclarationChecker 2019-09-29 12:27:44 +03:00
Ilya Kirillov 41fd9fff76 Minor: reformat CreateTypeParameterUnmatchedTypeArgumentActionFactory 2019-09-29 12:27:44 +03:00
Ilya Kirillov 21429f0b94 Do not try to add type parameter to non-writable declaration (EA-209570) 2019-09-29 12:27:43 +03:00
Ilya Kirillov a24da280ca Call update for ScratchAction in EDT thread (EA-210180) 2019-09-29 12:27:43 +03:00
Ilya Kirillov 7831237aaa Minor: reformat KotlinRunConfigurationProducer 2019-09-29 12:27:43 +03:00
Ilya Kirillov 016132c762 Fix NPE in KotlinRunConfiguration & do not throw exception on unknown container type (EA-209426) 2019-09-29 12:27:43 +03:00
Ilya Kirillov 9deb7dc8d6 New J2K: do not require module to be present on converting
It may not be present when performing conversion inside repl
2019-09-29 12:13:41 +03:00
Ilya Kirillov f77825b85a New J2K: remove RedundantCompanionReferenceInspectionBasedProcessing as it already applied on shortening references 2019-09-29 11:39:39 +03:00
Ilya Kirillov 95f69a9b58 New J2K: do not print debug info in inference tests 2019-09-29 11:39:39 +03:00
Ilya Kirillov aaf05d5eb2 New J2K: reduce count of post-processing groups 2019-09-29 11:39:38 +03:00
Ilya Kirillov 208c4d6fc7 New J2K: move visitor generator out of src folder 2019-09-29 11:39:38 +03:00
Ilya Kirillov 41935bdd34 New J2K: separate logic in code builder to different classes 2019-09-29 11:39:37 +03:00
Ilya Kirillov 043a669812 New J2K: do not print qualified names if corresponding qualifier can unambiguously resolved
This speeds up shortening qualified references phase
2019-09-29 11:39:37 +03:00