Vyacheslav Gerasimov
0db69cadb6
Build: Make all compile dependencies on toolsJar compileOnly
...
tools.jar differs between different versions of JDK reducing cache reuse
so better to not leak it to other modules
2020-02-29 16:35:54 +03:00
Ilya Kirillov
b21a9476c0
New J2K: minor, use firstNotNullResult in j2k reference resolver
2020-02-25 13:58:29 +03:00
Ilya Kirillov
b7711678c2
EA-218474: fix IAE in resolving empty fqName in new J2K
2020-02-25 13:58:29 +03:00
Ilya Kirillov
af5a70dcf5
EA-218043: fix getting resolution facade for empty list of elements in new J2K
2020-02-25 13:58:29 +03:00
Ilya Kirillov
a64526acfb
EA-210533: fix NPE in LiftReturnOrAssignmentInspection
...
It may be still active after its application due to slow IDEA responsiveness
Do not try to apply it again on invalid PSI elements
2020-02-25 13:58:29 +03:00
Roman Golyshev
1dbb3d7c0f
Revert "New J2K: fix testdata"
...
This reverts commit 285aa123
2020-02-20 17:33:39 +03:00
Roman Golyshev
4042214bb2
Fix tests broken by enhanced RedundantSamConstructor inspection
...
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00
Roman Golyshev
46ae6136cb
Rewrite RedundantSamConstructorInspection to support more cases
...
- Now inspection does not rely on synthetic descriptors at all, instead
it uses `SamConversionOracle` and `SamConversionResolver` to detect
if the argument type support SAM conversion
- This transparently considers all language features like
`SAM conversions for kotlin functions`, `Functional interfaces` etc.
- In case of multiple SAM arguments, part of them can be converted only
when `SAM conversion per argument` is enabled
- Fix inspection and nj2k tests that were failing because of better
working inspection
- Rewrite automatically fixes multiple bugs that were present
- ^KT-36367 ^KT-36368 ^KT-36296 ^KT-36395 Fixed
2020-02-19 17:16:17 +03:00
Ilya Kirillov
285aa123b7
New J2K: fix testdata
2020-02-19 12:02:32 +03:00
Ilya Kirillov
17a0e3a078
New J2K: do not call custom diagnostic fixes in EDT as they may have resolve inside
2020-02-19 12:02:31 +03:00
Ilya Kirillov
810966e408
New J2K: call reformat code & shorten references processings only single time
2020-02-19 12:02:30 +03:00
Ilya Kirillov
ee0ec421ce
New J2K: do not print Unit types
2020-02-19 12:02:29 +03:00
Ilya Kirillov
6c1e2cc196
New J2K: disable additional post-formatting for J2K
...
As there is a formatting processing, it's not needed but takes some time
2020-02-19 12:02:28 +03:00
Ilya Kirillov
85be0450ba
Fix invalidated element access exception in ObjectLiteralToLambdaIntention
...
#KT-36149 fixed
#KT-36152 fixed
2020-02-19 12:02:27 +03:00
Ilya Kirillov
6b913da698
New J2K: Fix super call to Kotlin class with implicit constructor
...
#KT-36159 fixed
2020-02-19 12:02:27 +03:00
Ilya Kirillov
7c586ce736
New J2K: Fix converting recursive types
...
#KT-36088 fixed
2020-02-19 12:02:26 +03:00
Nikolay Krasko
890109beb8
201: PsiElementVisitor.visitElement nullability
2020-02-11 20:28:04 +03:00
Dmitry Gridin
b5d0956a5e
Move call-site trailing comma to registry
...
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin
c34b417d0c
Fix tests after disabling trailing comma
...
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin
96f49d8e3c
Remove trailing comma from some tests
2020-01-30 15:32:09 +07:00
Victor Petukhov
437a26684d
NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed and remember flexibility of type parameters based on flexibility of its upper bounds
...
^KT-32435 Fixed
2020-01-17 19:16:09 +03:00
Dmitry Gridin
d06787886a
Fix tests after implementing trailing comma in formatter
...
#KT-34744
2020-01-17 21:02:54 +07:00
Pavel Kirpichenkov
69e800c695
Remove dependencies on data flow aware expression type in BindingContext
...
`BindingContext.getType`'s behaviour on argument expression has been different for OI and NI for some time.
New inference used to rewrite argument's type after smartcast, which led to missing subsequent smartcasts in some cases.
This commit makes retrieval of smartcasted argument type explicit.
2020-01-15 14:39:40 +03:00
Dmitriy Novozhilov
605ef647e6
Regenerate tests
2020-01-14 12:18:23 +03:00
Ilya Kirillov
a10f37dd50
New J2K: fix exception when met PsiLambdaParameterType
...
#KT-35431 fixed
2020-01-13 14:32:48 +03:00
Ilya Kirillov
5be80be74d
New J2K: fix converting multiline comment with /* inside
...
#KT-18001 fixed
#KT-35081 fixed
2020-01-13 14:32:47 +03:00
Ilya Kirillov
a87de01c74
New J2K: add missing line break between property and getter
...
#KT-35739 fixed
2020-01-13 14:32:46 +03:00
Ilya Kirillov
b83a529b77
New J2K: fix incorrectly removed line break before constructor comment
...
That caused class body brace to be under the comment
#KT-35478 fixed
2020-01-13 14:32:45 +03:00
Ilya Kirillov
7bfad12e6a
New J2K: correctly convert compound Java assignment expression
...
#KT-35476 fixed
2020-01-13 14:32:45 +03:00
Ilya Kirillov
6a8a68a263
New J2K: fix UninitializedPropertyAccessException when calculating type of anonymous class
...
#KT-35395 fixed
2020-01-13 14:32:44 +03:00
Ilya Kirillov
14a8d3726d
New J2K: remove initializer from property without backing field
...
#KT-33637 fixed
2020-01-13 14:32:43 +03:00
Alex Chmyr
16c82030a3
KT-20120 fixing bug for Java 9 Deprecated
...
Unconditionally changing it to @Deprecated("") in kotlin
2020-01-10 11:45:17 +03:00
Alexander Udalov
8a4510c21b
Regenerate tests
2020-01-02 10:31:00 +01:00
Ilya Kirillov
92f8432b1e
New J2K: Fix not converted jetbrains nullability annotations for types
...
it became broken after annotation started to be assigned to type elements
instead of declarations after 4da7d11
#KT-34987 fixed
2019-12-20 13:02:51 +03:00
Dmitriy Novozhilov
e7f8c8e155
[TEST] Regenerate tests after previous commit
2019-12-12 16:11:45 +03:00
Dmitry Gridin
70185ba2a6
Formatter, NJ2K: fix indent for comments inside function literals
...
#KT-4194 Fixed
#KT-31881 Fixed
#KT-34673 Fixed
#KT-35152 Fixed
2019-11-29 16:28:59 +07:00
Toshiaki Kameyama
3a576ce14f
KT-21811 Convert string concatenation into multiline string ( #2772 )
...
New J2K: Convert string concatenation into multiline string
#KT-21811 Fixed
2019-11-28 13:14:48 +03:00
Toshiaki Kameyama
be04912f6f
KT-19574 Code with inferred default parameters and parameter vs property name clashes ( #2671 )
...
New J2K: add 'this' receiver to default parameter value if needed
#KT-19574 Fixed
2019-11-27 18:55:50 +03:00
Toshiaki Kameyama
c72622c6d7
KT-32551 New J2K: Non-canonical modifiers order inspection is not applied during convertion of inner super class ( #2806 )
...
New J2K: add SortModifiers inspection to post-processing
#KT-32551 Fixed
2019-11-27 16:08:54 +03:00
Dmitry Gridin
b40a888f1d
Formatter: fix line break between declarations with annotations
...
#KT-35093 Fixed
#KT-35106 Fixed
2019-11-26 19:40:51 +07:00
Dmitry Gridin
bfd539d5d1
Formatter: fix line break between declarations with comment
...
#KT-12490 Fixed
#KT-35088 Fixed
2019-11-26 19:40:51 +07:00
Ilya Kirillov
f368d9761a
Fix for loop conversion when multiple initializers are present
...
#KT-35074 fixed
2019-11-25 17:01:46 +03:00
Mikhail Zarechenskiy
e0fb586aaf
[NI] Don't loose diagnostic after type variable fixation
...
#KT-24488 Fixed
2019-10-31 11:32:02 +03:00
Nikolay Krasko
4ed64b0283
Regenerate tests with TargetBackend.ANY remove and using runTest with this
2019-10-23 12:49:48 +03:00
Dmitry Gridin
92bfb2788e
idea: cleanup "Remove redundant qualifier name"
2019-10-17 14:30:25 +07:00
Vladimir Dolzhenko
eb9875b6f5
Added missed kotlin-reflect to nj2k testRuntime
2019-10-15 09:33:57 +02:00
Ilya Kirillov
1ec620b753
New J2K: fix SOE in inference processing for star-projection as type argument
...
#KT-33942 fixed
#KT-33941 fixed
2019-10-12 15:28:03 +03:00
Ilya Kirillov
b350515237
New J2K: make post-processing aware of other files which are being converted
...
Before post-processing was able to handle only one converting file at once
So, some conversions (like (field, getter, setter) to Kotlin property)
was not able to work when converting class hierarchy was split into
multiple files.
Also, inferring nullability for a set of files was broken
#KT-19569 fixed
#KT-34266 fixed
#KT-32518 fixed
2019-10-12 12:50:34 +03:00
Ilya Kirillov
999918d499
New J2K: add multi-file conversion tests from old j2k
2019-10-12 12:50:34 +03:00
Ilya Kirillov
f951ed9dba
New J2K: introduce external code processing for new J2K
...
It will update usages from files not in conversion scope to a valid ones:
1. When converting (field, getter, setter) triple from Java to a Kotlin property,
it will:
1. Update every usage of getter/setter in Java/Kotlin code to a usage of actual property
2. If property is used in Java directly then will add @JvmField to it
2. When converting static method or static field without getter and setter, which has Java usages then add @JvmStatic to it
#KT-34164 fixed
2019-10-12 12:50:33 +03:00