Toshiaki Kameyama
ce407471ec
Convert to secondary constructor: suggest on class name
...
#KT-40861 Fixed
2020-10-27 14:05:28 +07:00
Toshiaki Kameyama
752f6d8f72
Elvis -> if intention: don't introduce new variable when RHS type is Nothing
2020-10-26 20:57:16 +07:00
Toshiaki Kameyama
f9f8fd055b
Convert receiver to parameter: place value argument list after type argument list
...
#KT-41499 Fixed
2020-10-26 20:47:35 +07:00
Alexander Udalov
382a0bd298
JVM IR: clear BindingContext after psi2ir
...
This helps to reduce peak memory in lowerings/codegen by a lot.
A more robust approach would be to have a separate BindingContext for
each file, and clear each of them after running psi2ir on it. This would
also lower peak memory usage in psi2ir.
Provide a fallback workaround compiler argument
-Xir-do-not-clear-binding-context just in case BindingContext is in fact
used somewhere and it's not caught by tests.
2020-10-26 10:34:43 +01:00
Alexander Udalov
bc76f1fec3
Refactor test utilties to reuse GenerationState construction
2020-10-26 10:34:43 +01:00
Alexander Udalov
dd813777b9
Refactor Main-Class computation in CLI for JVM with .jar outputs
...
Compute FQ name of the main class right after running the analysis and
before invoking codegen. This is needed because MainFunctionDetector
depends on BindingContext, and JVM IR needs to clear BindingContext as
soon as it's not necessary to reduce peak memory usage, thus breaking
any usages of data from it after the codegen.
Also refactor and use the extracted, but not properly reused previously,
copy of findMainClass in findMainClass.kt.
Note that this replaces NPE in KT-42868 with an UOE.
2020-10-26 10:34:43 +01:00
Vladimir Dolzhenko
0a18be62e5
Add prefix for inner test classes in ide perf tests to avoid metric name clashes
2020-10-25 22:49:30 +01:00
Yan Zhulanow
c07f25fa44
Revert "FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable"
...
This reverts commit bb7d4c22
2020-10-24 00:22:41 +09:00
Yan Zhulanow
87574dddd9
Revert "ReplaceWith: suggest for "invoke" extension"
...
This reverts commit be194c34
2020-10-24 00:22:41 +09:00
Yan Zhulanow
04457e92d0
Revert ""Put/Join arguments/parameters" intention: don't suggest on nested argument list"
...
This reverts commit 4a328981
2020-10-24 00:22:41 +09:00
Yan Zhulanow
3321ce6325
Revert ""Code Cleanup": don't remove deprecated imports when file has @file:Suppress("DEPRECATION") annotation"
...
This reverts commit cf5a6274
2020-10-24 00:22:41 +09:00
Yan Zhulanow
839c30d04b
Revert "Additional minor fixes for KT-33594: avoid using hard-coded annotation name, simplify hasAnnotationToSuppressDeprecation()"
...
This reverts commit 2a841550
2020-10-24 00:22:40 +09:00
Yan Zhulanow
9320637efe
Revert "Redundant companion reference: do not report 'values/valueOf' function in enum"
...
This reverts commit 55d55446
2020-10-24 00:22:40 +09:00
Yan Zhulanow
383190f25e
Revert "Replace with ordinary assignment: do not suggest when operator is augmented assignment operator function"
...
This reverts commit 73e319ca
2020-10-24 00:22:40 +09:00
Yan Zhulanow
7fccd0153b
Revert "Refactoring: Remove hard-coded augmented assignment check with a Name check"
...
This reverts commit 016e78e4
2020-10-24 00:22:40 +09:00
Yan Zhulanow
0ae21a157f
Revert ""Change to return with label" quick fix: apply for type mismatch"
...
This reverts commit f76e9886
2020-10-24 00:22:39 +09:00
Yan Zhulanow
601198634d
Revert "Minor: Extract lambda return expression handling"
...
This reverts commit 55038e19
2020-10-24 00:22:39 +09:00
Yan Zhulanow
b18de1e3ff
Revert "Provide quickfix for specifying type of variable initialized with null"
...
This reverts commit cdf7f46c
2020-10-24 00:22:39 +09:00
Yan Zhulanow
4327bc4ac3
Revert "KT-23394: Add a test with a property"
...
This reverts commit f2dc132d
2020-10-24 00:22:38 +09:00
Yan Zhulanow
fe64fcf8a3
Revert "Minor: update order in IntentionTestGenerated"
...
This reverts commit 6515d53b
2020-10-24 00:22:38 +09:00
Yan Zhulanow
c4a48598c0
Revert ""Add parameter to function" for TYPE_MISMATCH: fix it works correctly for extension function"
...
This reverts commit 03e725d5
2020-10-24 00:22:38 +09:00
Yan Zhulanow
16dbf7ba74
Revert "Convert to range check: don't report it if recursive call will be created"
...
This reverts commit 73184884
2020-10-24 00:22:38 +09:00
Yan Zhulanow
d735637f1e
Revert "RemoveBracesIntention: add new line for long expression"
...
This reverts commit f4b9c477
2020-10-24 00:22:37 +09:00
Yan Zhulanow
f615ed2f26
Revert ""Use destructuring declaration": fix it works correctly if variable name is shadowed"
...
This reverts commit d61158a1
2020-10-24 00:22:37 +09:00
Yan Zhulanow
ab70cc35ea
Revert "Add quick fix for 'JAVA_CLASS_ON_COMPANION'"
...
This reverts commit 15a615d6
2020-10-24 00:22:37 +09:00
Yan Zhulanow
6cc4d70b07
Revert "Minor: Remove hard-coded 'Companion' name"
...
This reverts commit 871ad2b9
2020-10-24 00:22:37 +09:00
Yan Zhulanow
19f518c037
Revert "IfThenToSafeAccessInspection: fix it works correctly for variable/operator call"
...
This reverts commit 5095caee
2020-10-24 00:22:36 +09:00
Yan Zhulanow
19896f9616
Revert "Minor: Use second pattern argument instead of explicit callee.text"
...
This reverts commit 55e36fa1
2020-10-24 00:22:36 +09:00
Yan Zhulanow
519f92599c
Revert "Minor: Import DebuggerUtils"
...
This reverts commit 58f606e1
2020-10-24 00:22:36 +09: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