Ilya Gorbunov
dccae6c3ff
Introduce annotation InlineExposed to indicate internal members effectively public due to usage in inlined functions.
...
Currently, doesn't affect anything.
Make collectionSizeOrDefault and collectionSizeOrNull internal, but expose them via inlining together with mapCapacity.
Make Regex(Pattern) constructor exposed by inlined Pattern.toRegex
2016-02-01 22:20:27 +03:00
Ilya Gorbunov
c7bd70732c
Inline-only in generated code
2016-02-01 22:09:07 +03:00
Ilya Gorbunov
8c0008aa2e
StdLib Generators: support three flavors of inline
2016-02-01 22:09:07 +03:00
Gabriel Borges
d58efff974
Add foldIndexed and reduceIndexed groups of functions
...
- foldIndexed, foldRightIndexed, reduceIndexed and reduceRightIndexed have been added, in line with filterIndexed etc.;
- Test cases added appropriately for the new functions.
2016-01-31 02:45:02 +03:00
Ilya Gorbunov
d46501e11b
Make all remaining deprecations to be errors.
2016-01-27 18:34:32 +03:00
Ilya Gorbunov
263e1b4b5d
Drop deprecated mapIndexedTo on Maps.
2016-01-27 18:34:31 +03:00
Ilya Gorbunov
8d02467e6d
Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>
...
#KT-9992 Fixed
2016-01-27 00:00:01 +03:00
Ilya Gorbunov
90a239e74c
Provide toMutableList as a replacement for toArrayList.
2016-01-26 11:49:15 +03:00
Ilya Gorbunov
564155734b
Introduce associateTo and associateByTo with the destination MutableMap to fill.
2016-01-26 11:49:12 +03:00
Ilya Gorbunov
8224a4e186
Rename toMap and toMapBy to associate and associateBy
2016-01-26 11:49:03 +03:00
Ilya Gorbunov
7703252239
Provide groupBy and groupByTo with keySelector and valueTransform.
...
Rename parameters of groupBy, add type parameter for MutableMap to groupByTo.
2016-01-25 21:15:56 +03:00
Ilya Gorbunov
0eaaee8202
StdLib Generators: parse generic function parameters into primitive model
2016-01-25 21:15:19 +03:00
Ilya Gorbunov
a78b08d9c7
Use generic coerceIn for nullable primitives, provide specialization for non-nullable ones.
...
Fix docs for coerceAtMost.
2016-01-24 06:44:13 +03:00
Ilya Gorbunov
13b1e91eb5
StdLib Generators: fix type projections, do not use concat.
2016-01-23 05:13:26 +03:00
Ilya Gorbunov
ef0d998fbc
Drop deprecations: *Raw functions.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
85a02d40c6
Drop hidden declarations provided for binary compatibility
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
264c9a0fc9
Drop deprecated toGenerator and toLinkedList (again).
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
91f4cf0ebc
Drop Progression<T> and its deprecated properties: start, end, increment.
...
Drop deprecated range extensions.
Make progression constructors private.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
6dd8470835
Drop deprecated primitive ranges and progressions: for Byte and Short
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
e8621cb738
Drop Range<T> interface and its extensions.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
67ef790abc
Move comparison related functions to kotlin.comparisons, update imports in stdlib.
2016-01-18 21:46:31 +03:00
Ilya Gorbunov
3d5e415c87
Annotate Iterable.forEach and Map.forEach with HidesMembers.
...
#KT-10538 Fixed
#KT-10479 Fixed
2016-01-16 15:33:12 +03:00
Ilya Gorbunov
68971e2162
Remove redundant JvmName annotations for Array.copyOf, copyOfRange
2016-01-14 18:30:41 +03:00
Ilya Gorbunov
b99e1111f6
Do not use out projection for Array where appropriate.
2016-01-14 18:30:40 +03:00
Ilya Gorbunov
eb5b5331fb
Minor: reorder invariant arrays of objects in generated code
2016-01-14 18:30:39 +03:00
Ilya Gorbunov
362e463b26
Preserve type projection for Array.requireNoNulls.
...
#KT-10039 Fixed
2016-01-14 18:30:37 +03:00
Dmitry Petrov
c97294a066
stdlib fixes:
...
- 'sequence(initialValue: T?, ...)' should have LowPriorityInOverloadResolution
(otherwise 'sequence({...}, {...})' is ambiguous).
- 'copyOf' and 'copyOfRange' should be defined for 'Array<T>' only
('Array<out T>' version always loses to 'Array<T>', since the second one
is always more specific).
2015-12-30 10:44:00 +03:00
Ilya Gorbunov
055c71e8d0
Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
...
#KT-9002 Fixed
2015-12-18 00:00:52 +03:00
Ilya Gorbunov
b5e637bed5
Rename toMap with selector and transform to toMapBy
2015-12-17 22:50:44 +03:00
Ilya Gorbunov
544bc9a70c
Introduce toMap with key-value pair selector.
...
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov
33967a09f6
Unify minBy and maxBy for Maps with other families.
2015-12-14 04:56:47 +03:00
Ilya Gorbunov
33b366b9b9
Relax upper bound of T for minBy and maxBy to be nullable.
...
Swap type parameters of minBy and maxBy.
#KT-10099 Fixed
2015-12-14 04:56:45 +03:00
Ilya Gorbunov
feff5b2327
Stdlib generators: change values back to function.
2015-12-14 03:49:59 +03:00
Ilya Gorbunov
871c5c66b4
Move code between packages (JS)
2015-12-14 03:49:46 +03:00
Ilya Gorbunov
81e7826568
Move generated code between packages.
2015-12-14 03:49:43 +03:00
Ilya Gorbunov
0ffce06356
Hide toMap with keySelector
...
#KT-6657
2015-12-01 01:18:46 +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
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
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
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
d21985493e
Mark functions with 'operator' in JS stdlib
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
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