Dmitry Jemerov
6684dff14b
j2k: cleanup 'public', property access syntax
2016-01-07 18:13:10 +01:00
Natalia Ukhorskaya
0a6dbc91ae
Fix EA-75128 - KNPE: IdentifierKt.declarationIdentifier
2015-12-30 14:49:29 +03:00
Ilya Gorbunov
fcfb063eca
Cleanup in modules: j2k, jps, ant and generators.
2015-12-29 18:04:18 +03:00
Natalia Ukhorskaya
513c4a4562
J2K: transform loops with double, float and char range with while
...
#KT-899 Fixed
2015-12-18 16:14:17 +03:00
Natalia Ukhorskaya
ecdef71580
J2K: cast right operand of equals for primitive types to left operand type
...
#KT-9997 Fixed
2015-12-18 16:14:16 +03:00
Natalia Ukhorskaya
1d787ed222
J2K: Insert initializer type for properties with primitive type if necessary
2015-12-18 16:14:15 +03:00
Mikhail Glukhikh
3fb04aceb9
Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
...
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Natalia Ukhorskaya
5e231db631
J2K: convert method from Map (Java8) with cast to java.util.Map
...
#KT-10400 Fixed
2015-12-17 11:11:21 +03:00
Natalia Ukhorskaya
3f7b8554dd
J2K: parenthesize receiver if needed
...
#KT-10121 Fixed
2015-12-17 11:11:20 +03:00
Natalia Ukhorskaya
f3a6c541ec
J2K: Convert usages of kotlin functions from library correctly
...
#KT-6115 Fixed
2015-12-17 11:11:18 +03:00
Natalia Ukhorskaya
c79ffbac5c
Run code cleanup on j2k module
2015-12-17 11:11:16 +03:00
Natalia Ukhorskaya
68101eeffa
J2K: do not drop formatting for expressions with operator
2015-12-17 11:11:15 +03:00
Alexey Tsvetkov
199827635f
Reserve 'typeof' as a keyword
2015-12-10 21:26:41 +03:00
Andrey Breslav
434082cadb
'yield' reserved as a keyword
2015-12-09 17:10:30 +03:00
Denis Zharkov
406e31f54a
Change default rules for declaration-site wildcards
...
Mostly this commit is about skipping wildcards that are redundant in some sense.
The motivation is that they looks `long` in Java code.
There are basically two important parts: return types and value parameters.
1. For return types default behaviour is skipping all declaration-site wildcards.
The intuition behind this rule is simple: return types are basically used in subtype position
(as an argument for another call), and here everything works well in case of 'out'-variance.
For example we have 'Out<Out<T>>>' as subtype both for 'Out<Out<T>>>' and 'Out<? extends Out<? extends T>>>',
so values of such type is more flexible in contrast to `Out<? extends Out<? extends T>>>` that could be used only
for the second case.
But we have choosen to treat `in`-variance in a different way: argument itself
should be rendered without wildcard while nested arguments are rendered by the rules
described further (see second part).
For example: 'In<Out<OpenClass>>' will have generic signature 'In<Out<? extends OpenClass>>'.
If we omit all wildcards here, then value of type 'In<Out<OpenClass>>'
will be impossible to use as argument for function expecting 'In<? super Out<? extends Derived>>'
where Derived <: OpenClass (you can check it manually :]).
And this exception should not be very inconvinient because in-variance is rather rare.
2. For value parameters we decided to skip wildcards if it doesn't make obtained signature weaker
in a sense of set of acceptable arguments.
More precisely:
a. We write wildcard for 'Out<T>' iff T ``can have subtypes ignoring nullability''
b. We write wildcard for 'In<T>' iff T is not equal to it's class upper bound (ignoring nullability again)
Definition of ``can have subtypes ignoring nullability'' is straightforward and you can see it in commit.
#KT-9801 Fixed
#KT-9890 Fixed
2015-12-01 08:20:59 +03:00
Andrey Breslav
8544a5ab5f
Remove "This" keyword
2015-11-30 19:36:33 +03:00
Yan Zhulanow
a3ff3ffc45
Fix tests: "Placing function type parameters after the function name" error
2015-11-27 15:51:11 +03:00
Yan Zhulanow
278f1cd6ef
Fix "Placing function type parameters after the function name" errors in project
2015-11-27 15:51:11 +03:00
Yan Zhulanow
87799e9b6b
Fix "operator modifier required" errors in project
2015-11-27 15:51:11 +03:00
Yan Zhulanow
46ac3571d5
Fix "infix modifier required" errors in project
2015-11-27 15:51:11 +03:00
Valentin Kipyatkov
f98b354bc1
KT-10005 Java to Kotlin: do not convert type cast to cast to nullable if it should not be null
...
#KT-10005 Fixed
2015-11-24 12:17:51 +03:00
Valentin Kipyatkov
d78390e489
KT-10004 Java to Kotlin: array.length is converted to array.size() instead of array.size
...
#KT-10004 Fixed
2015-11-24 12:17:51 +03:00
Ilya Gorbunov
775755dfac
Introduce String.toCharArray() instead of String.getChars()
...
Make special method conversion for java.lang.String.getChars() in J2K
2015-11-21 00:54:29 +03:00
Ilya Gorbunov
21e2e68ed4
Replace reversed() with apply { reverse() } or asReversed()
2015-11-21 00:54:03 +03:00
Ilya Gorbunov
32151c077e
Replace map { ... }.filterNotNull() with mapNotNull { ... }
2015-11-21 00:54:01 +03:00
Mikhail Glukhikh
f81a5c06ea
Protected in allowed in companion objects but forbidden in other objects, relevant test fixes
2015-11-20 16:32:59 +03:00
Mikhail Glukhikh
4e44466cf9
Exposed visibility deprecation warnings made errors + relevant test fixes
2015-11-20 15:21:01 +03:00
Ilya Gorbunov
07c570f35d
Replace getStackTrace usages in j2k and testData.
2015-11-11 18:59:56 +03:00
Ilya Gorbunov
f3ff2e2e76
Replace deprecated join with joinToString
2015-11-06 01:12:00 +03:00
Dmitry Jemerov
19af88738b
remove Jet from names of classes in tests: phase 2
2015-11-03 14:06:04 +01:00
Dmitry Jemerov
3bd7f87d2b
rename "Jet" from names of IDE classes; consistently use Kt prefix for PSI elements and classes directly related to specific PSI elements
2015-11-02 18:49:35 +01:00
Dmitry Jemerov
736b496f6a
drop deprecated @platformName and @platformStatic annotations
2015-11-02 17:00:44 +01:00
Pavel V. Talanov
e5f075c7f6
Refactor light fields: move all implementation into one file and prettify code
2015-11-02 18:38:52 +03:00
Mikhail Glukhikh
f8a70302ac
Cleanup: get rid of effective visibility warnings
2015-10-28 14:31:51 +03:00
Valentin Kipyatkov
891e033d5b
KT-9664 Add quickfix to convert a piece of code to pretty look SAM-style
...
#KT-9664 Fixed
2015-10-27 15:07:59 +03:00
Alexey Sedunov
3fd6864461
Extraction Engine: When extracting to enum class body, place new declaration after the last entry
...
#KT-9629 Fixed
2015-10-24 19:50:52 +03:00
Valentin Kipyatkov
66310806ca
KT-9628 Intention&inspection to replace use of "set" operator function with []
...
#KT-9628 Fixed
2015-10-22 18:48:15 +03:00
Valentin Kipyatkov
36ea9cfbfc
J2K: fixed conversion of Throwable.getMessage(), Throwable.getCause(), Map.Entry.getKey() and Map.Entry.getValue()
2015-10-21 13:46:57 +03:00
Dmitry Jemerov
49033e0002
rename Jet* classes to Kt*
2015-10-19 21:35:30 +02:00
Pavel V. Talanov
300aeb83b0
Fix test data for j2k conversion
...
(cherry picked from commit e3bac5e)
2015-10-19 16:03:21 +03:00
Mikhail Glukhikh
f61aa18a05
Code cleanup: get rid of _ (mostly renamed to arg)
2015-10-19 15:24:42 +03:00
Svetlana Isakova
bb9f7094e0
Report 'TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH'
...
on call element, not on callee expression
2015-10-19 14:15:05 +03:00
Valentin Kipyatkov
fc10fa66be
J2K does not convert usages of java "get" methods into "[]" (explicit "operator" modifier is required)
2015-10-19 09:43:13 +03:00
Valentin Kipyatkov
55575b7f10
J2K adds "operator" modifier to methods that look like operator on conversion
2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
4e73fe0f39
Renamed test data folder
2015-10-19 09:43:11 +03:00
Valentin Kipyatkov
dc909ac166
J2K: coversion of specially mapped built-in methods + replacing "get" with "[]" where possible
2015-10-19 09:43:11 +03:00
Alexander Udalov
bd5f068454
Fix build after subtle change of Enum.name from function to property
2015-10-14 22:00:48 +03:00
Mikhail Glukhikh
c6a1bd7df3
different enum property rename: name --> ...
2015-10-14 20:40:18 +03:00
Ilya Gorbunov
7ff0e140f0
Update MockJDK to include Pattern.class required in tests for #KT-7732
2015-10-12 00:13:37 +03:00
Ilya Gorbunov
4ae2491ab6
J2K: Special conversion for java.lang.String methods: String.join (cannot be tested with MockJDK)
...
#KT-7732
2015-10-12 00:13:23 +03:00