Commit Graph

1282 Commits

Author SHA1 Message Date
Ilya Gorbunov b7a50b333e Better replacement for containsAll, removeAll, retainAll with incompatible types. 2015-12-01 20:35:46 +03:00
Stanislav Erokhin bc49825f55 Fix testLib test 2015-12-01 15:38:01 +03:00
Denis Zharkov ddb67d6c9c Support JvmSuppressWildcards and JvmWildcard annotations
#KT-9898 Fixed
2015-12-01 08:21:00 +03:00
Ilya Gorbunov 0ffce06356 Hide toMap with keySelector
#KT-6657
2015-12-01 01:18:46 +03:00
Ilya Gorbunov ea60ab74a7 Replace deprecated toMap usages with toMapBy 2015-12-01 01:18:44 +03:00
Ilya Gorbunov f107559a3c Docs: proper pluralization of 'entry' 2015-12-01 01:18:21 +03:00
Ilya Gorbunov 6ca647aecd Minor: cleanup asSequence() documentation. 2015-12-01 01:18:19 +03:00
Ilya Gorbunov f596d9ac23 Provide asIterable also for CharSequences, Maps and Iterables.
KT-10152 Fixed
2015-12-01 01:18:18 +03:00
Alexander Udalov db2521ee67 Rework TestlibTest, use JUnit console runner instead of manual suite
The problem with the manually created suite was that it was created in setUp()
and so a lot of the hard work (compilation, test case lookup) was happening in
setUp(). If any exception is thrown in setUp(), tearDown() is not called,
leaving the application (~9000+ subsequent tests) in the inconsistent state.

Support JUnit 4 tests via JUnit4TestAdapter. Previously only a small number of
test classes were actually run because this test was looking only for JUnit 3
testcases.

Delete FilesTest#relativePath because it was testing a deprecated function
and was failing if run from the project root
2015-11-30 18:58:00 +03:00
Ilya Gorbunov f7a780f32c Extension contains for ranges: rename parameter item to value. 2015-11-30 14:12:11 +03:00
Ilya Gorbunov 661e288362 Introduce 'step' property in progressions instead of 'increment' 2015-11-30 14:12:05 +03:00
Ilya Gorbunov 0a47d1cac2 Restore deprecated InputStream.iterator() with a replacement. 2015-11-29 04:38:28 +03:00
Ilya Gorbunov 941167e241 Revert "Drop deprecated toGenerator and toLinkedList." until RC 2015-11-29 04:37:45 +03:00
Ilya Gorbunov f8fe3e6c1d Restore dropped hidden declarations for binary compatibility until RC. 2015-11-29 04:37:35 +03:00
Ilya Gorbunov 54b415593a Replacement upcasts parameter to the most specific supertype in case of contains, indexOf, lastIndexOf, remove, get, containsKey, containsValue. 2015-11-28 07:21:38 +03:00
Ilya Gorbunov de86e90103 Generate indexOf and lastIndexOf extensions for List. 2015-11-28 07:20:27 +03:00
Ilya Gorbunov c7d08ea599 Remove *Raw method usages from tests 2015-11-28 07:20:25 +03:00
Ilya Gorbunov a25f23a286 Apply @OnlyInputTypes on type parameter for contains, indexOf, lastIndexOf extensions for Iterables, Sequences and Arrays instead of @NoInfer on element parameter.
Provide covariant extensions annotated with @OnlyInputTypes:
 - Collection<T>: containsAll(Collection<T>),
 - MutableCollection<out T>: remove(T), removeAll, retainAll (Collection<T>),
 - List<T>: indexOf(T), lastIndexOf(T)
 - Map<out K, V>: get(K), containsKey(K), contains(K)
 - Map<K, V>: containsValue(V)
 - MutableMap<out K, V>: remove(K)
All *Raw extensions are deprecated.
2015-11-28 07:20:24 +03:00
Yan Zhulanow 9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Yan Zhulanow a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Ilya Gorbunov ca4bdd23e0 Provide flatten for sequence of iterables.
#KT-9977
2015-11-26 00:45:15 +03:00
Ilya Gorbunov 4181142400 Deprecate sequenceOf(Progression). 2015-11-26 00:45:15 +03:00
Ilya Gorbunov 8440c196d1 GeneratorSequence: do not get first value, until it's requested by iterator, allow initialValue to be null and return EmptySequence in this case.
#KT-9153 Fixed
2015-11-26 00:45:15 +03:00
Ilya Gorbunov 229504f42d Byte iterator only available for buffered input streams,
InputStream.buffered() returns BufferedInputStream.
2015-11-25 18:35:03 +03:00
Ilya Gorbunov c848ebdc52 Deprecate complex delegation to map. 2015-11-25 18:35:03 +03:00
Ilya Gorbunov 77f69abca4 Drop deprecated toGenerator and toLinkedList. 2015-11-25 18:35:02 +03:00
Ilya Gorbunov c485eda1c2 Make zip operation symmetrical for CharSequences (missed to generalize parameter before). 2015-11-25 18:35:01 +03:00
Ilya Gorbunov a05d0a3c49 Drop hidden declarations provided for binary compatibility in beta2 2015-11-25 18:35:00 +03:00
Ilya Gorbunov 542ab6ae34 Deprecate String.toCharList to use toList instead. 2015-11-25 18:34:58 +03:00
Ilya Gorbunov b253ace198 Test different return results of collection mutation operations. 2015-11-25 17:18:59 +03:00
Ilya Gorbunov f17316f4b4 Provide removeAll and retainAll with predicate for MutableIterables and MutableList.
#KT-8760 Fixed
2015-11-25 17:18:58 +03:00
Ilya Gorbunov 5ab2f47101 Make MutableCollection extensions return Boolean indicating whether the operation resulted collection to be changed. 2015-11-25 17:18:58 +03:00
Alexander Udalov f98703dcdb Minor, fix URL in JvmName kdoc 2015-11-23 14:56:50 +03:00
Ilya Gorbunov 5aa415c609 MutableMap.iterator() returns MutableIterator. 2015-11-21 07:09:07 +03:00
Ilya Gorbunov 0dbbb6c19c Rename operand parameter of plus and minus for collections 2015-11-21 00:54:37 +03:00
Ilya Gorbunov 2ed277a863 Add upperbound constraint Comparable<T> to toSortedSet() and sortedMapOf()
Provide an overload of toSortedSet() with Comparator<in T> parameter
#KT-10115 Fixed
2015-11-21 00:54:33 +03:00
Ilya Gorbunov b61bef324d Make Char.category and directionality properties instead of functions.
Provide contains(Char) operator for CharCategory.
2015-11-21 00:54:30 +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 bf3a77b736 Deprecate Regex.matcher() with ERROR and provide the replacement. 2015-11-21 00:54:28 +03:00
Ilya Gorbunov eb2a976f32 Minor: use EnumSet to hold options of regex. 2015-11-21 00:54:26 +03:00
Ilya Gorbunov 7035c300d0 Rename parameters of a thread function. 2015-11-21 00:54:25 +03:00
Ilya Gorbunov 47b3859641 Deprecate monitorEnter and monitorExit not to be used from user code. 2015-11-21 00:54:23 +03:00
Ilya Gorbunov 9d24f1d1cf Delegates.mapVal and mapVar preserve type of the receiver to when calling default value lambda. 2015-11-21 00:54:22 +03:00
Ilya Gorbunov 0f70def3db StdLib: Rename method parameters (generated code) 2015-11-21 00:54:20 +03:00
Ilya Gorbunov 7e7a55bbe4 StdLib: Rename method parameters (Strings) 2015-11-21 00:54:19 +03:00
Ilya Gorbunov bbe6a3c7ca StdLib: Rename method parameters (Maps) 2015-11-21 00:54:18 +03:00
Ilya Gorbunov a3cd86d2cd StdLib: Rename method parameters (Collections) 2015-11-21 00:54:16 +03:00
Ilya Gorbunov c3190bbae3 Migrate type parameter list syntax. 2015-11-21 00:54:15 +03:00
Ilya Gorbunov a426c7879f Apply infix modifier on functions from stdlib where appropriate. 2015-11-21 00:54:12 +03:00
Ilya Gorbunov 794819cea2 StdLib cleanup: make calls non-infix 2015-11-21 00:54:10 +03:00