Commit Graph

1002 Commits

Author SHA1 Message Date
Ilya Gorbunov 010e530ac4 Make common KClass extend common KClassifier
It already does that in all platforms.
Add KClass common API test.
2020-07-13 23:20:52 +03:00
Ilya Gorbunov 20683d62a6 Postpone introducing common StringBuilder.capacity() function
Its support complicates JS StringBuilder implementation with no actual
performance improvements. Benefits of having capacity() function
in common code are also not completely clear.

Relates to KT-33069
#KT-40168
2020-07-10 18:49:39 +03:00
Vsevolod Tolstopyatov 3270c7e016 Introduce CancellationException
#KT-39126 Fixed
2020-07-02 11:01:28 +03:00
Abduqodiri Qurbonzoda d3fb9cc5f3 Deprecate with error mixed Int/FP contains operator for ranges KT-22423 2020-06-29 12:18:19 +03:00
Ilya Gorbunov 53cbcfac5a Validate arguments of KTypeProjection constructor
#KT-34596 Fixed
2020-06-25 18:25:24 +03:00
Ilya Gorbunov 696701d377 Drop deprecated MutableMap property delegation operator 2020-06-22 12:29:25 +03:00
Ilya Gorbunov e9c4f531eb Increase deprecation level for previously deprecated API
- unsupported common exceptions
- common 'synchronized'
- jquery API
- experimental kotlin.time API
- js Math object
- DefaultAsserter constructor-like fun
2020-06-22 12:29:24 +03:00
Ilya Gorbunov 130987fa1e Provide flatMapIndexed operation
- similar to flatMap, but transform function takes index and element

#KT-36894
2020-06-19 17:55:15 +03:00
Abduqodiri Qurbonzoda c923b2e139 Deprecate contains, indexOf, lastIndexOf functions of Float/DoubleArray #KT-28753 2020-06-19 08:39:47 +03:00
Abduqodiri Qurbonzoda 97c688057d Compare floating point values asList elements in total order #KT-28753 2020-06-19 08:39:47 +03:00
Abduqodiri Qurbonzoda 16b62b8e65 Introduce minWithOrNull and maxWithOrNull extension functions #KT-38854 2020-06-19 04:53:53 +03:00
Abduqodiri Qurbonzoda 194791a168 Introduce minByOrNull and maxByOrNull extension functions #KT-38854 2020-06-19 04:53:51 +03:00
Abduqodiri Qurbonzoda 846a7823ad Introduce minOrNull and maxOrNull extension functions #KT-39064 2020-06-19 04:53:49 +03:00
Ilya Gorbunov de6154980d Make ReadOnlyProperty and PropertyDelegateProvider fun interfaces 2020-06-17 19:45:15 +03:00
Abduqodiri Qurbonzoda 6a2fed33d3 Deprecate old CharArray to String conversion api #KT-31343 2020-06-08 04:12:28 +03:00
Abduqodiri Qurbonzoda 820353ee0e Promote scanReduce deprecation level to error 2020-06-07 10:05:40 +03:00
Ilya Gorbunov d19f9ee0c5 Simplify min/max implementation 2020-06-02 19:01:44 +03:00
Ilya Gorbunov b4ba00ca36 Document and test NaN propagation of maxOf/minOf
Also simplify minOf/maxOf implementations

#KT-38708
2020-06-02 19:01:44 +03:00
Ilya Gorbunov 7b68de38e1 Introduce minOf/maxOf, minOfWith/maxOfWith and their OrNull variants
#KT-38708 Fixed
2020-06-02 19:01:44 +03:00
Ilya Gorbunov 6a24becd1d Introduce sumOf with various selector types
#KT-11253
2020-06-02 19:01:43 +03:00
Ilya Gorbunov bdd53ee9cd Introduce new overloads of flatMap and flatMapTo
- Sequence<T>.flatMap((T) -> Iterable<R>)
- Iterable<T>.flatMap((T) -> Sequence<R>)
- Array<T>.flatMap((T) -> Sequence<R>)
- Map.flatMap((Entry) -> Sequence<R>)

KT-34506
2020-06-02 19:01:43 +03:00
Abduqodiri Qurbonzoda 1bd63bb07f Make consistent parameter nullability with appendLine 2020-06-01 22:00:36 +03:00
Abduqodiri Qurbonzoda e05eeea6cd Promote common StringBuilder to stable 2020-06-01 22:00:34 +03:00
Ilya Gorbunov 7cc4cc0cec Make testDeepTreeOddEvenNodesMutual two times easier
Otherwise it often times out in JS tests in a parallel build.
2020-06-01 20:15:55 +03:00
Roman Elizarov 46b426ef77 KT-31741: stdlib: DeepRecursiveFunction (#3398)
Introduces experimental coroutines-based framework to execute deeply recursive functions that utilities the heap and thus avoid StackOverflowError.
2020-05-27 10:06:00 +03:00
Abduqodiri Qurbonzoda f3145454f2 Decommonize collection builder implementations 2020-05-23 03:40:44 +03:00
Ilya Gorbunov d37c412f76 Suppress a couple more warnings 2020-05-19 19:24:00 +03:00
Ilya Gorbunov bf21e1282a Suppress most of unused parameter warnings 2020-05-19 19:24:00 +03:00
Abduqodiri Qurbonzoda 0c7b04a495 Document fromIndex and toIndex parameters #KT-38388 2020-05-09 23:34:03 +03:00
Abduqodiri Qurbonzoda ec166db506 Implement collection builders 2020-04-30 02:28:41 +03:00
Abduqodiri Qurbonzoda d6472aa700 Reverse range and sortDescending range #KT-36955 2020-04-20 22:06:28 +03:00
Abduqodiri Qurbonzoda 57597f5900 Fix String.toHashSet tests 2020-04-20 04:08:29 +03:00
Abduqodiri Qurbonzoda 0d5ec27ac4 toHashSet is suboptimal for inputs with a lot of duplicates #KT-23142 2020-04-19 07:58:49 +03:00
Ilya Gorbunov 893021f22b Introduce runningFold and runningReduce operations
runningFold is a synonym for scan,
runningReduce replaces scanReduce.

#KT-38060
2020-04-15 23:28:07 +03:00
Ilya Gorbunov ea1e16e309 Delegate properties to property references
#KT-8658
2020-04-15 18:37:33 +03:00
Abduqodiri Qurbonzoda 08ff52bee4 Introduce StringBuilder.appendLine in stdlib-common #KT-37839 2020-04-13 14:27:53 +03:00
Ilya Gorbunov 408b441a71 Rename extension toStringWithTrace to stackTraceToString
#KT-37603
2020-04-13 09:32:42 +03:00
Ilya Gorbunov 641f1a55cb Omit common stack frames in JS full stack trace
#KT-37603
2020-04-13 09:32:41 +03:00
Ilya Gorbunov 5fe8071d71 Prevent infinite recursion in case of circular suppressed chains
#KT-37603
2020-04-13 09:32:41 +03:00
Ilya Gorbunov 552bcdb31b Introduce Throwable.toStringWithTrace
#KT-37603
2020-04-13 09:32:41 +03:00
Ilya Gorbunov 7b7263c5bf Implement common Throwable.addSuppressed/suppressed extensions
Instead of `suppressed` Array we provide `suppressedExceptions` List

#KT-23737
2020-04-13 09:32:41 +03:00
Abduqodiri Qurbonzoda 4a7b1b210a Add onEachIndexed similar to forEachIndexed #KT-37161 2020-04-11 03:47:47 +03:00
Ilya Gorbunov 15319eb88e Implement in-place shuffle for arrays
Minor: reorder shuffle/shuffled extensions more consistently

#KT-25651 Fixed
2020-04-10 11:04:51 +03:00
Ilya Gorbunov e58f1c8932 Introduce Sequence.shuffled
#KT-37751
2020-04-10 10:59:40 +03:00
Abduqodiri Qurbonzoda 508d0edd6d Add the onEach extension function to the Array #KT-28290 2020-04-07 05:34:20 +03:00
Ilya Gorbunov a225842f9b Test that known Floats can fit in FloatArray without over/underflow
But some precision loss can still happen in JS.

Relates to KT-24975
2020-04-02 04:04:04 +03:00
Ilya Gorbunov d88d2cb058 Test new Double/Float constants
Split test expectations based on actual support of enforced Float range

KT-29182, KT-13887
2020-04-02 04:04:04 +03:00
Abduqodiri Qurbonzoda b1fac4e721 Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866 2020-03-12 18:08:55 +03:00
Abduqodiri Qurbonzoda b60633d79a Add associateWith to Array<T> #KT-30372 2020-03-12 18:06:54 +03:00
Abduqodiri Qurbonzoda e632d58936 Nullable Array.contentEquals/contentHashCode/contentToString #KT-34161 2020-03-12 18:01:23 +03:00