Commit Graph

130 Commits

Author SHA1 Message Date
Victor Petukhov c111c33950 Fix failing tests after 8bd78064be 2021-01-25 16:24:43 +03:00
Abduqodiri Qurbonzoda 662787b12b Straighten Char-to-code and Char-to-digit conversions out #KT-23451 2020-12-31 12:07:41 +03:00
Ilya Kirillov 949c67078d NJ2K: fix testdata of MultiFileTestGenerated.testNullabilityByDFa 2020-08-26 16:17:24 +03:00
Alex Chmyr a5368e443c KT-20421 fixing code generation for the case when "object" extends "class". It should look like: "object: class()". 2020-08-19 11:46:29 +03:00
Ilya Kirillov 08e2dd3dea NJ2K: fix implicit type cast in binary expressions
#KT-37298 fixed
2020-08-18 17:38:07 +03:00
Ilya Kirillov d5d57f84e0 NJ2K: preserve annotations while converting class to object
#KT-38879 fixed
2020-08-18 17:38:07 +03:00
Simon Ogorodnik 8bcf1000f6 J2K: Fix java 9 try-with-resources 2020-07-29 17:56:02 +03:00
Simon Ogorodnik 468af0bb85 J2K: Fix type parameters in LHS of callable reference 2020-07-29 17:50:10 +03:00
Roman Golyshev be06c51aa7 KT-40363 Handle non-octal int literals in for-loop conversions
- See EA-210233
- ^KT-40363 Fixed
2020-07-23 11:24:48 +00:00
Roman Golyshev cba671a3ef KT-40359 Catch NumberFormatException during literal conversion
- Instead of failing J2K conversion completely, insert TODO expression
to the resulting code (it is better to have a converted code with TODO
than to have nothing at all)
- See EA-210233 for similar exceptions
- ^KT-40359 Fixed
2020-07-23 11:24:48 +00:00
Mikhail Zarechenskiy a6e58edfb9 Update test data, unmute test
Now behavior is the same as in OI for these cases.
 The behavior was changed in 100a6f70ca
2020-07-17 07:47:15 +03:00
Dmitry Gridin 10c62b8d77 ImportOptimizer: add cases for unresolved references
Part of #KT-31331
2020-06-23 09:48:06 +00:00
Roman Golyshev 7fb5acc718 KT-18538 Fix inspection to detect unnecessary grand-base class qualifier
- Add separate option to enable/disable this inspection, as it is not
obvious if it should be always enabled or not
  - This option can be used to detect all unnecessary qualifiers in
  tests
- Add possibility to configure inspections via `settings.xml` in the
`AbstractMultiFileLocalInspectionTest.kt`
- ^KT-18538 Fixed
2020-06-01 08:59:37 +00:00
Roman Golyshev 4436142f00 KT-38450 Add functional interface converter to the NJ2K
- Enable custom compiler options for
`AbstractNewJavaToKotlinConverterSingleFileTest`
- ^KT-38450 Fixed
2020-05-25 11:11:24 +03:00
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00
Ilya Kirillov e4a721d03e New J2K: do not create erroneous conversion from Java accessors to property
#KT-38004 fixed
2020-04-17 15:08:51 +03:00
Harry 27827cd364 New J2K: Convert Number.[type]Value() to Number.to[type]() (#2908)
New J2K: Convert Number.[type]Value() to Number.to[type]()
2020-04-10 14:25:49 +03:00
PetelimovaNadezhda 517de44d20 KT-35897: change type for enum constructor for visibility 2020-04-06 16:42:53 +03:00
Ilya Kirillov bc52281208 New J2K: convert Java method reference to Kotlin one on copy-pasting Java code
#KT-34965 fixed
2020-03-31 19:35:55 +03:00
Ilya Kirillov d6d843aaed New J2K: fix assignment target in ConvertGettersAndSettersToPropertyProcessing
#KT-36190 fixed
2020-03-31 19:35:55 +03:00
Ilya Kirillov b3e728f4fb New J2K: don't allow open modifier on top-level/private declarations 2020-03-31 19:35:55 +03:00
Ilya Kirillov 4d4aa88534 New J2K: handle spaces in array dimensions declaration
#KT-36891 fixed
2020-03-31 19:35:55 +03:00
Ilya Kirillov 353e884c8f New J2K: do not merge methods if there are vararg parameters present 2020-03-31 19:35:55 +03:00
Ilya Kirillov 78d2aaa021 New J2K: handle null Java type 2020-03-31 19:35:54 +03:00
Mikhail Bogdanov 3f87899014 Switch converter test to new directive scheme 2020-03-19 16:45:10 +01:00
Dmitry Gridin 7886cb4c44 i18n: fix tests 2020-03-16 18:40:51 +07:00
Yan Zhulanow 7a40274b71 i18n: Unify string naming in KotlinBundle 2020-03-16 18:40:42 +07:00
Ilya Chernikov 70c89a28e1 Stop subtyping constraint search if equality constraints for...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01: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 810966e408 New J2K: call reformat code & shorten references processings only single time 2020-02-19 12:02:30 +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
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
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 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
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