Commit Graph

24347 Commits

Author SHA1 Message Date
Ilya Gorbunov dd71cbb96e Accept more generic ranges in contains. 2015-07-27 19:02:47 +03:00
Ilya Gorbunov e127e234f8 Stdlib Generators: add generic ranges, allow specify concrete primitive for generic, render types in receiver. 2015-07-27 19:02:45 +03:00
Alexey Sedunov f4ebd895ca Change Signature: Reduce JetChangeSignatureUsageProcessor state to prevent
memory leaks. JetMethodDescriptor is stored in UsageInfo list
2015-07-27 17:29:02 +03:00
Alexey Sedunov 4f12dcc069 Move: Make MoveKotlinFileHandler stateless to prevent memory leaks. MoveKotlinTopLevelDeclarationsProcessor is made part of transient state, PackageNameInfo is recomputed based on file user data and container 2015-07-27 17:29:01 +03:00
Dmitry Jemerov 978fb2c1cf don't go outside of file when trying to find enclosing element for declaration 2015-07-27 11:43:12 +02:00
Natalia Ukhorskaya 47b94326ec Add NotNull assertions at project.getComponent
(cherry picked from commit 9b1167c)
2015-07-27 12:06:01 +03:00
Natalia Ukhorskaya 728290f99e Fix compilation error in tests
(cherry picked from commit ea5b532)
2015-07-27 12:06:01 +03:00
Natalia Ukhorskaya 71bf9b1b30 LightProjectDescriptor is no longer an interface
(cherry picked from commit b99235b)
2015-07-27 12:06:00 +03:00
Natalia Ukhorskaya e66569c451 Update to IDEA 3371.3 2015-07-27 12:06:00 +03:00
Dmitry Petrov a64f1a86c0 Fix KT-8608: Compiler crashes with assertion Restore stack is unavailable
- fix SAVE_STACK_BEFORE_TRY insertion:
  TRYCATCHBLOCK LA, LB, LC
  LA
    NOP
    try_body
  LB
    ...
  LC
    handler_body
should be transformed into:
  LA
    {SAVE_STACK_BEFORE_TRY}
  LA' // new TCB start label
    NOP
    try_body
  LB
    ...
  LC
    handler_body
with all TCBs start labels remapped

- properly wrap exceptions from MandatoryMethodTransformer

 #KT-8608 Fixed
2015-07-27 10:40:14 +03:00
Valentin Kipyatkov a58f249a01 KT-8576 Parameter name&type completion: don't auto-popup for the second time
#KT-8576
2015-07-27 10:37:12 +03:00
Valentin Kipyatkov b9a62d0acf Fixed parameter name&type auto-popup completion to insert "dynamic" on typing ": " 2015-07-27 10:37:11 +03:00
Alexey Sedunov acb8c54902 Move: Get rid of MoveKotlinTopLevelDeclarationsOptions.sourceFile 2015-07-24 21:03:07 +03:00
Alexey Sedunov 9219f2214e Move: Fix ClassCastException on attempt to move several classes (located in different files) to the same file
#KT-8437 Fixed
2015-07-24 21:03:06 +03:00
Alexey Sedunov e74749eea1 Move: Reinitialize move context as MoveFileHandler.findUsages() can be bypassed
#KT-8436 Fixed
2015-07-24 21:03:05 +03:00
Alexey Sedunov 5179c10b4c Move: Disable "Update package directive" check box when moving separate declarations instead of entire file
#KT-8414 Fixed
2015-07-24 21:03:04 +03:00
Alexey Sedunov 05fd4b75dd Move: NPE fix
#KT-8410 Fixed
2015-07-24 21:03:03 +03:00
Alexey Sedunov fc885dedc5 Move: Do not use "Search references" Java options when silently invoking Move refactoring for entire file. Default to true instead 2015-07-24 21:03:02 +03:00
Alexey Sedunov cc13c157f6 Move: Forbind moving to non-Kotlin file
#KT-8500 Fixed
2015-07-24 21:03:01 +03:00
Alexey Sedunov 82a47a0f2d Move: Fix "Update package directive" label
#KT-8546 Fixed
2015-07-24 21:03:00 +03:00
Sergey Mashkov 0453368990 Better main function recognition and tests
fix vararg main
2015-07-24 17:20:40 +03:00
Sergey Mashkov 8457b53f8b Better main function recognition and tests 2015-07-24 17:20:40 +03:00
Pavel V. Talanov 273e69c02c Refactor: Pass buitlins into IntegerValueTypeConstant and IntegerValueTypeConstructor 2015-07-24 13:47:59 +03:00
Pavel V. Talanov a1a38e2eba Minor: CompileTimeConstant use utils instead of JetType#equals 2015-07-24 13:47:58 +03:00
Pavel V. Talanov 0bed8bb7d4 Minor: Inject builtins into OverloadingConflictResolver 2015-07-24 13:47:57 +03:00
Pavel V. Talanov 4599c962f0 Refactor: make OverloadingConflictResolver and ResolutionResultsHandler components instead of singletons 2015-07-24 13:47:57 +03:00
Pavel V. Talanov 1559c53007 Minor: Inject builtins into DataFlowAnalyzer 2015-07-24 13:47:56 +03:00
Pavel V. Talanov 78f55583f0 Minor: CompileTimeConstantUtils, builtins are not needed to check for string type 2015-07-24 13:47:55 +03:00
Pavel V. Talanov 7203a7833a Minor: Inject builtins in ControlFlowAnalyzer 2015-07-24 13:47:55 +03:00
Pavel V. Talanov 0830e48029 Minor: FakePureImplementationsProvider does not need builtins, just fq names 2015-07-24 13:47:54 +03:00
Pavel V. Talanov 83503b66d2 Minor: get rid of minor KotlinBuiltins.getInstance usage 2015-07-24 13:47:53 +03:00
Pavel V. Talanov 99e8ba1947 Get rid of static function ConstantExpressionEvaluator.evaluateToConstant 2015-07-24 13:47:53 +03:00
Pavel V. Talanov 6698b3b070 Refactor: get rid of static ConstantExpressionEvaluator.evaluate function
Move ArgumentTypeResolver.getLastElementDeparenthesized to JetPsiUtil
2015-07-24 13:47:52 +03:00
Pavel V. Talanov 2b9fc5268e Inject ConstantExpressionEvaluator into JsCallChecker
Do not pass expected type into evaluateExpression
2015-07-24 13:47:51 +03:00
Ilya Gorbunov 065945176e Use bare types in check and remove unneeded cast after.
Do not check whether a sequence is actually a collection or list.
2015-07-24 04:35:45 +03:00
Ilya Gorbunov e799c92131 Accept more generic range for coerceIn. 2015-07-24 04:35:33 +03:00
Ilya Gorbunov 877cb72ba1 Array.copyOfRange: rename from, to to fromIndex, toIndex 2015-07-24 04:35:21 +03:00
Ilya Gorbunov aeb7666578 Provide binarySearch with comparator for arrays. 2015-07-24 04:35:08 +03:00
Ilya Gorbunov 34afb450d8 List binarySearch and binarySearchBy methods and tests.
#KT-5444 Fixed
#KT-8217 Fixed
2015-07-24 04:34:56 +03:00
Ilya Gorbunov 3a7f6d7db0 Add inlineable compareValuesBy for single selector. 2015-07-24 04:34:44 +03:00
Ilya Gorbunov d831509cee Provide listOfNotNull method. 2015-07-24 04:34:31 +03:00
Ilya Gorbunov 46858ddabd Allow to specify optional from and to indices for filling an array.
#KT-8382 Fixed
2015-07-24 04:34:19 +03:00
Ilya Gorbunov c1975d0b2e Array.fill returns Unit since it's an in-place array operation.
Revised #KT-4760
2015-07-24 04:34:07 +03:00
Ilya Gorbunov 12e3542bce Provide toTypedArray method for primitive arrays. 2015-07-24 04:33:55 +03:00
Ilya Gorbunov f57c207ed2 Introduce NotImplementedError instead of UnsupportedOperationException to throw from TODO function.
#KT-8153
2015-07-24 04:32:52 +03:00
Ilya Gorbunov b7829d8471 JS: Make js Error to be mapped to kotlin.Throwable, inherit Exception and Error from Throwable. 2015-07-24 04:32:03 +03:00
Ilya Gorbunov f2716a973c TODO as a function. Add an overload with a string reason.
#KT-8153 Fixed
2015-07-24 04:30:10 +03:00
Ilya Gorbunov bfb116c0b2 Provide TODO as a substitution for not yet implemented method body.
#KT-8153
2015-07-24 04:29:31 +03:00
Ilya Gorbunov da3ec891d0 Provide unzip method for Iterables, Arrays and Sequences of pairs.
#KT-5793 Fixed
2015-07-24 04:28:57 +03:00
Ilya Gorbunov f604eef2fe Undeprecate find(predicate) and generate it for all collection-like types. Provide findLast(predicate).
Drop deprecated method findNot and extension properties first, last, head, tail
#KT-5185 Fixed
2015-07-24 04:28:46 +03:00