Dmitry Jemerov
25959fefdc
J2K: generate 'interface' keyword instead of 'trait'
2015-05-12 11:49:37 +02:00
Denis Zharkov
9101505eca
Rework deparenthesize-like methods
...
- Extract private `deparenthesizeOnce` and repeat it until get the same expression
- Drop redundant parameter `deparenthesizeRecursively`
- Drop some usages of `safeDeparenthesize` in `deparenthesize`
because even if `deparenthesize` returns null (i.e. something was not parsed)
there is no sense in working with such expressions
Note, that `deparenthesize` now unwraps nested labels' declaration (see changes in testData),
but it seems to be reasonable
2015-05-07 22:36:15 +03:00
Valentin Kipyatkov
7d6145e105
J2K converter applies IfNullToElvisIntention automatically
2015-05-02 14:03:25 +03:00
Denis Zharkov
44a55e5bf6
Adjust testData to new labels syntax
2015-04-29 14:03:11 +03:00
Denis Zharkov
036f31f36b
j2k: Generate class literals in throws
2015-04-21 08:08:32 +03:00
Mikhail Glukhikh
d5aed62410
Smart casts for local variables not captured in a closure and not changed in a loop, see #KT-3175.
...
isLocalVariable added. Assignment / initialization analysis.
Control whether a variable is changed in a loop at the beginning and at the end of the loop.
Control whether a variable is captured in a closure. #KT-3175 Fixed. #KT-2266 Fixed.
Tests for variable null safety and for variables is/as operations.
Loop / closure / variable property tests are included.
Old tests changed in accordance with KT-3175. In particular, all three of testSmartcastImpossible were fixed.
2015-04-16 20:10:58 +03:00
Valentin Kipyatkov
f6e363abb8
J2K: replace overloads with optional parameters not only for constructors but for methods too
2015-04-09 19:09:07 +03:00
Valentin Kipyatkov
3efc6cd383
J2K: default parameter values generated for secondary constructors too
2015-04-09 19:09:07 +03:00
Valentin Kipyatkov
9b80d49bab
Generated constructors with default parameter values are marked with kotlin.jvm.overloads annotation
2015-04-09 19:09:06 +03:00
Valentin Kipyatkov
1afbb961ee
KT-7135 Java to Kotlin converter should update usages in Java and Koltin code in the rest of the project
...
#KT-7135 Fixed
2015-04-09 19:09:06 +03:00
Denis Zharkov
f85e92a247
j2k: Adjust annotation converter to last changes
...
Only parameter named `value` can be marked vararg
2015-04-07 19:31:30 +03:00
Denis Zharkov
717f850470
Setup spacing rules for primary ctor's parts
2015-03-31 20:20:22 +03:00
Valentin Kipyatkov
d5326031c4
J2k: for through range with != comparison is also recognized
2015-03-31 16:10:24 +03:00
Valentin Kipyatkov
11b4e66fd0
Better tests
2015-03-31 16:10:24 +03:00
Valentin Kipyatkov
c66b20b204
KT-6795 J2K: When converting to type with projections, omit redundant use-site projections
...
#KT-6795 Fixed
2015-03-31 16:10:24 +03:00
Valentin Kipyatkov
7e50f72d5b
J2K: no call to super constructor in the header of class when there is no primary constructor
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov
c57f2b10d6
J2K: use of emptyList, emptySet and emptyMap
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov
1465418c2b
KT-7151 Convert 'System.out.println()' to just 'println()'
...
#KT-7151 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov
39f94d7d45
KT-6044 J2K: Convert numeric float literals to 0.2f instead of 0.2.toFloat() + more fixes related to literals and type transformations
...
#KT-6044 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov
5454f7053f
KT-6349 J2K: Static members of enums should be converted to class object members
...
#KT-6349 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov
f19eb20803
KT-5287 J2K: Convert class with private constructor and static functions to "object" instead of class with "class object"
...
#KT-5287 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov
6dbb13c32d
KT-6798 J2K: Needless use of run {} function after converting for-loop
...
#KT-6798 Fixed
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov
46193f3ef7
KT-5692 Java to Kotlin conversion: convert int range loops in reverse order + a few more improvements
...
#KT-5692 Fixed
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov
fb4075cc2f
J2K: inlining intermediate variable after removing type cast
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov
e31648a4b6
KT-6476 Kotlin J2K converter fails with for-loops with continues
...
#KT-6476 Fixed
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov
2d4055e921
J2K: generating of elvis operators instead of if's
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov
0932cb4606
J2K: auto-replacing of if's with safe access
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov
555ae1ebd3
J2K: no redundant type casts
...
#KT-6794 Fixed
2015-03-31 16:10:21 +03:00
Valentin Kipyatkov
7d92559d13
J2K: generating "!is" instead of !(.. is ..)
2015-03-31 16:10:21 +03:00
Valentin Kipyatkov
108a1f872c
J2K: use of new syntax for class intialization blocks
2015-03-31 16:10:21 +03:00
Denis Zharkov
13f933693f
Setup spacing rules for anonymous initializers
2015-03-18 19:59:25 +03:00
Denis Zharkov
22425de5cb
Setup spacing rules for secondary constructors
...
#KT-6968 Fixed
2015-03-17 23:18:34 +03:00
Pavel V. Talanov
06916d98c6
default -> companion: replace all mentions of default and default object
2015-03-17 15:47:39 +03:00
Valentin Kipyatkov
569e4a68ae
Support for secondary constructors in j2k
2015-03-15 22:30:19 +01:00
Alexander Udalov
6287055475
J2K: convert array.length to array.size()
2015-03-07 02:29:13 +03:00
Pavel V. Talanov
59f192ef90
Replace 'class object' with 'default object' in renderers and test data
...
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Dmitry Jemerov
ac6a56761e
J2K: convert javadoc comments to kdoc
2015-03-03 18:31:30 +01:00
Pavel V. Talanov
1adf15d01d
Update test data for j2k converter tests
2015-02-16 15:38:40 +03:00
Valentin Kipyatkov
ae9ebbec7d
Corrected test data
2015-01-21 20:10:18 +03:00
Alexander Udalov
b4e71bb0b6
Minor, rename package in some j2k tests
2015-01-03 04:22:01 +03:00
Alexander Udalov
3c859caf2b
j2k: flatten test cases and testData directory structure
...
Move j2k/test/tests -> j2k/tests, j2k/test/testData -> j2k/testData
2015-01-03 00:52:59 +03:00