Ilya Gorbunov
cff32e46bb
Provide expect declarations for String.startsWith/endWith overloads
...
Mark the existing declarations as actual.
2018-11-22 19:17:24 +03:00
Ilya Gorbunov
3d2a3cddff
Stop producing empty kotlin-stdlib-coroutines jar
2018-11-21 03:42:27 +03:00
Ilya Gorbunov
5f4e8bf4fb
Correct abstract mutable collections declarations in kotlin-stdlib-common
...
Add SinceKotlin(1.3) to the new and substantially changed common declarations
#KT-28091
2018-11-09 13:39:44 +03:00
Ilya Gorbunov
4f2ec3533a
Remove inline modifier from expect functions without lambda or reified types
...
This gives more flexibility when providing actuals for them.
2018-11-09 13:39:07 +03:00
Ilya Gorbunov
b026b9eb22
Remove +ReleaseCoroutines explicit feature enabling
...
It's enabled by default in Kotlin 1.3
2018-11-09 04:00:26 +03:00
Ilya Gorbunov
a64a76d5fc
Remove experimental coroutines opt-in from build scripts
...
It has no effect in Kotlin 1.3
Only enable coroutines if '-ReleaseCoroutines' is used
2018-11-09 04:00:26 +03:00
Karen Schwane
d88fd8aa6f
KT-20357 Add samples for maxBy and minBy
2018-11-04 22:34:16 +03:00
Ilya Gorbunov
c8caed5b6f
Duplicate MutableList.add docs in AbstractMutableList.add
...
Because the documentation inheritance doesn't work as desired here.
2018-10-23 22:21:25 +03:00
Ilya Gorbunov
a1c0c679ee
Common String.toNumber: clarify thrown exception types
2018-10-22 17:14:45 +03:00
Ilya Gorbunov
7fc6f06b70
Correct parameter reference in copyInto docs
2018-10-22 17:14:44 +03:00
Ilya Gorbunov
ebe9d59df7
Unify print/println/readLine docs
2018-10-22 17:14:44 +03:00
Ilya Gorbunov
406bd7c980
Minor: split math sources into regions
2018-10-22 17:14:44 +03:00
Nikolay Krasko
e3d930a6a1
Build maven-like stdlib sources artifacts during dist
...
This is needed to emulate gradle and maven like projects in plugin tests.
2018-10-12 18:50:04 +03:00
Ilya Gorbunov
d6beddaac5
Document the requirement for 'minus(elements)' to have stable hashCode
...
#KT-24536
2018-10-01 18:09:09 +03:00
Alexander Udalov
55c8b35eee
Remove unneeded default imports in stdlib and tests
2018-10-01 13:39:02 +02:00
Ilya Gorbunov
3a40e3f041
Move groupingByEachCount together with the new Grouping samples
2018-09-28 19:51:07 +03:00
Ilya Gorbunov
0c81e30d46
Make a more correct implementation of unsigned arrays copyInto
...
Return the destination array instead of the destination storage array
wrapped in a new unsigned array. The difference should be
indistinguishable, however in JS, where inline classes are not inlined yet,
it had resulted in an extra wrapper.
2018-09-26 22:57:14 +03:00
shiraji
0c97d99d77
KT-20357 Add sample code for Regex.find
...
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com >
2018-09-26 22:24:53 +03:00
Ilya Gorbunov
df6ccbca49
KT-20357 Add samples for elementAtOrElse
...
Move samples to Elements nested class.
2018-09-26 20:44:40 +03:00
Takayuki Matsubara
7d5efe7f51
KT-20357 Add samples for elementAtOrNull
2018-09-26 20:44:40 +03:00
Takayuki Matsubara
ad9b700ec4
KT-20357 Add samples for elementAt
2018-09-26 20:44:40 +03:00
Ilya Gorbunov
974837654e
Remove workaround for complex default value in Array.copyInto
...
#KT-22818
2018-09-22 18:24:00 +03:00
Mikhail Zarechenskiy
d7f2eeb6e8
Add BuildInference annotation onto stdlib coroutine builders
2018-09-18 18:55:26 +03:00
Ilya Gorbunov
f4af656e20
Remove entire stdlib opt-in for unsigned types to control precisely where they are exposed
2018-09-17 17:58:27 +03:00
Ilya Gorbunov
aac96c476a
Rename sequence and iterator builder functions and their scope class
...
This introduces new functions instead of the existing sequence builders:
- `sequence` instead of `buildSequence`
- `iterator` instead of `buildIterator`
- `SequenceScope` instead of `SequenceBuilder`
The old functions were deprecated with error and made inline-only, and `SequenceBuilder` has been
made a deprecated typealias to `SequenceScope`.
Move sequence builders to `SequencesKt` facade class.
Replace sequence builder usages in stdlib and samples.
#KT-26678
2018-09-16 23:30:35 +03:00
Ilya Gorbunov
1eda3805ec
Introduce overloads to check for T? element contained in iterable range in a constant time
...
#KT-18483
2018-09-11 17:06:42 +03:00
Mikhail Zarechenskiy
106ecadd62
Allow using kotlin.Result as a return type in stdlib
2018-09-11 10:39:27 +03:00
Ilya Gorbunov
48add96e79
Deprecate mixed Int/FP contains operator for ranges
...
#KT-22423
2018-09-11 05:40:15 +03:00
Ilya Gorbunov
68c5c0f639
Introduce ConcurrentModificationException typealias in stdlib/jvm
...
This is required to provide the corresponding expect exception in stdlib/common.
Raise deprecation level for constructors declared in common but unsupported in JVM.
#KT-26598
2018-09-11 04:59:56 +03:00
Ilya Gorbunov
e22ca022d4
Switch sourcesets of experimental and release coroutines
...
- Move experimental coroutines out of the main source root.
- Include experimental coroutines into the coroutines source set.
- Include release coroutines into the main source set.
2018-09-07 01:03:53 +03:00
Ilya Gorbunov
4344005fb5
Deprecate synchronized function in common stdlib #KT-26595
2018-09-06 21:15:31 +03:00
Mikhail Zarechenskiy
6c747dcdb2
Don't use constant conversion from signed to unsigned in stdlib
...
After daadba0927
2018-08-31 18:17:09 +03:00
Ilya Gorbunov
36f154882c
Provide JvmSynthetic annotation in stdlib-common as optional
...
#KT-24478
2018-08-31 04:17:42 +03:00
Ilya Gorbunov
0c89996e34
Introduce platform specific annotations as optional in common stdlib
...
#KT-24478
2018-08-31 04:17:42 +03:00
Ilya Gorbunov
ce7a863843
Move OptionalExpectation and related annotations to another source root
2018-08-31 04:17:42 +03:00
Ilya Gorbunov
009980944b
Refine the exception type of EmptyRange.random()
...
Make it the same type as in case of an empty collection, so that
`emptyRange.random()` throws the same exception as `emptyRange.toList().random()`.
#KT-15539
2018-08-30 16:21:36 +03:00
Ilya Gorbunov
ea2c33a532
Extension random() to select random element from a collection
...
Fixes #KT-15539
2018-08-30 16:21:27 +03:00
Ilya Gorbunov
ea37a65178
copyInto: copying elements between two arrays
...
#KT-25874 Fixed
2018-08-30 16:21:20 +03:00
Dmitry Savvinov
accbd07b2e
Publish ContractsDsl
...
- Mark @ContractsDsl as @Experimental
- Move Contracts DSL out from 'internal' package
- Change visibility of ContractsDsl from 'internal' to 'public'
^KT-25274 Fixed
^KT-25495 Fixed
2018-08-30 16:19:51 +03:00
Ilya Gorbunov
4df665bc78
Generate extensions for unsigned arrays and provide tests for them
...
- contentEquals, contentToString, contentHashCode
- as[Signed]Array, as[Unsigned]Array
- to[Signed]Array, to[Unsigned]Array
- toTypedArray
- copyOf(), copyOf(newSize), copyOfRange(...)
2018-08-30 14:58:26 +03:00
Ilya Gorbunov
3d2eb36486
Generate until, downTo, step, reversed functions for unsigned ranges/progressions
2018-08-30 14:58:20 +03:00
Ilya Gorbunov
f367322084
Introduce associateWith and associateWithTo functions
...
#KT-13814
2018-08-30 14:58:14 +03:00
Ilya Gorbunov
a8596a9cd6
Rename experimental coroutines expect sources
...
In order not to clash in sources jar with expect sources of release coroutines
2018-08-30 14:57:14 +03:00
Ilya Gorbunov
357c5be4fb
Make sure index and count do not overflow for long sequences
...
Throw an exception immediately before an overflow becomes observable.
Place check to prevent negative index from indexOf, indexOfFirst.
Do not insert overflow checks for arrays, lists, maps and char sequences.
#KT-16097
2018-08-30 14:57:05 +03:00
Ilya Gorbunov
2df78fc81a
Introduce common ArithmeticException
...
Make divisionByZero test still fail in JS after introducing ArithmeticException
2018-08-30 14:56:59 +03:00
Ilya Gorbunov
85af1f5d38
Improve argument validation in copyOfRange
...
Make copyOfRange implementation non-inline in order not to expose
copyOfRangeToIndexCheck implementation detail.
It will be possible to make the function non-inline itself later without
that JvmName trick, when apiVersion 1.2 support is discontinued.
#KT-19489
2018-08-30 14:56:29 +03:00
Ilya Gorbunov
fa2f1311d7
Add tests for UInt, ULong
...
Opt-in to use unsigned types in tests
2018-08-30 14:55:41 +03:00
Ilya Gorbunov
db7f4bb402
Deprecate js Math.random and provide replacement with Random.nextDouble
...
#KT-23564 Fixed
2018-08-30 14:52:47 +03:00
Ilya Gorbunov
bbee18b84d
Introduce StringBuilder.clear() extension
...
#KT-18910 Fixed
2018-08-30 14:50:29 +03:00
Ilya Gorbunov
b160561795
Include new coroutines and unsigned classes into stdlib
...
Fix clashing module name in common coroutines sourceset
2018-08-30 14:50:21 +03:00