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
Alexander Udalov
795d6ab407
Migrate UseExperimental->OptIn in project sources
2020-03-10 12:07:14 +01:00
Abduqodiri Qurbonzoda
d5c851980c
String.toBoolean() should be String?.toBoolean() #KT-14119
2020-03-05 17:53:29 +03:00
Abduqodiri Qurbonzoda
1f721796b8
Add vararg overloads for maxOf/minOf functions #KT-33906
2020-02-26 04:17:19 +03:00
Abduqodiri Qurbonzoda
ce8e511b79
Add setOfNotNull function #KT-35851
2020-02-18 02:33:59 +03:00
Abduqodiri Qurbonzoda
ed7b8e9b85
Scan functions for Sequences and Iterable #KT-7657
2020-02-13 04:01:47 +03:00
Abduqodiri Qurbonzoda
ddcc3b39f7
JS Regex.find does not throw on invalid start index #KT-36082
2020-02-12 18:26:50 +03:00
Abduqodiri Qurbonzoda
c592201a43
Fail fast in Regex.findAll on an invalid startIndex #KT-28356
2020-02-12 18:26:49 +03:00
Vsevolod Tolstopyatov
a00e98bad9
KT-36118 Introduce AbstractCoroutineContextKey and corresponding extensions required by its implementors
...
* It enables subtyping relationship for keys and elements, allowing type-safe and concise manipulations on the context when complex hierarchies of elements (e.g. implementors of ContinuationInterceptor) are present
* It unblocks possibility to implement suspendCancellableCoroutine in stdlib
* Implementing proper polymorphic get and minusKey in AbstractCoroutineContextElement is impossible because it will introduce source-incompatible change
* ContinuationInterceptor get and minusKey are adjusted in a completely backwards-compatible way
2020-01-24 16:17:14 +03:00
Ilya Gorbunov
14351446d7
KT-15363 Fix failing test: missing capacity parameter check in JS
...
Partially restore JVM map capacity implementation
2020-01-24 15:28:18 +03:00
Ilya Gorbunov
4aa7d45a5a
KT-15363 Collection builders: improve tests and samples
2020-01-24 15:28:17 +03:00
Fleshgrinder
bf9d3d87a6
KT-15363 Collection Builders
...
Added container builders for lists, sets, and maps.
The new experimental type inference only works for the simple builders
with a single generic type. The versions with nullability and the maps
still require explicit specification of the types. Obviously explicit
specification is required for all users who are not using the new
experimental inference. Improving the type inference is something that
should be done separately and many things – including these builders –
will benefit from it, however, this is not a blocker for these builders
in my opinion.
2020-01-24 15:28:17 +03:00
Abduqodiri Qurbonzoda
e89893b6fd
Optimize ArrayDeque tests run time
2020-01-24 05:52:18 +03:00
Ilya Gorbunov
8733d5f9ed
ArrayDeque: avoid triggering JDK 1.6 bug in tests
...
Use System.arraycopy instead of Arrays.copyOfRange to
avoid triggering JDK-7174363 bug in copyOfRange.
Fix package of ArrayDequeTest
2020-01-24 01:39:48 +03:00
Abduqodiri Qurbonzoda
1203df7405
Deprecate floating point to integral types lesser than Int #KT-30360
2020-01-22 23:27:35 +03:00
Abduqodiri Qurbonzoda
e459542e6f
Add removeFirst(OrNull) and removeLast(OrNull) methods to MutableList
2020-01-22 23:22:28 +03:00
Abduqodiri Qurbonzoda
b6849efd47
Common ArrayDeque
2020-01-22 23:22:21 +03:00
Ilya Gorbunov
1336da8453
Rename Clock to TimeSource, ClockMark to TimeMark
...
Step 2: rename classes and interfaces.
Provide deprecated typealiases to smooth migration.
2020-01-21 03:28:35 +03:00
Abduqodiri Qurbonzoda
3cad1bbb51
Create method Collection.randomOrNull() #KT-35347
2020-01-16 22:25:53 +03:00
Ilya Gorbunov
043eddb432
Cleanup: use effects introduced by contracts of assert* functions
2019-12-28 02:51:56 +03:00
Ilya Gorbunov
6d092b5f71
Add more reduceOrNull tests
...
- Test for unsigned arrays
- Update binary api dump with the new functions
2019-12-26 19:27:47 +03:00
Alfredo Delli Bovi
06008c40ab
KT-33761 Add reduceRightOrNull
2019-12-26 19:27:46 +03:00
Alfredo Delli Bovi
f5d696d3c4
KT-33761 Add reduceOrNull
2019-12-26 19:27:46 +03:00
Abduqodiri Qurbonzoda
56cae75404
Fix StringBuilder reverse test
2019-12-10 13:07:27 +03:00
Abduqodiri Qurbonzoda
20d02dd0ee
Commonize StringBuilder
2019-12-04 22:15:33 +03:00
Ilya Gorbunov
bbdbc2896b
Workaround in FloatMathTest.powers to avoid failures with js-ir runtime
...
Include kotlin-stdlib-js-ir in local core libs build/test and
enable failing build on test failures.
Relates to: KT-24975
2019-10-16 17:48:47 +03:00