Commit Graph

106 Commits

Author SHA1 Message Date
Neonailol ede2e227c2 KT-23356 Cross-platform function to convert CharArray slice to String
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-26 06:06:53 +03:00
Ilya Gorbunov 418db53ba4 Array.copyOf docs: do not use 'primitive default' term, rewrite description
#KT-22298
2018-05-25 21:52:36 +03:00
Valeriy Zhirnov 9239de9a02 KT-22298 Improve docs for Array.copyOf(newSize: Int)
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-25 21:52:36 +03:00
Alexander Udalov bf3419c3bd Introduce OptionalExpectation for annotations missing on some platforms
This commits adds a new annotation OptionalExpectation to the standard
library, which is experimental. To enable its usage, either pass
'-Xuse-experimental=kotlin.ExperimentalMultiplatform' as a compiler
argument, or '-Xuse-experimental=kotlin.Experimental' and also annotate
each usage with `@UseExperimental(ExperimentalMultiplatform::class)`

 #KT-18882 Fixed
2018-05-24 13:14:51 +02:00
Florian Steitz d7bada0c29 [KT-10456] Added JS implementation for Int.toString(radix) and similar overloads 2018-05-11 15:42:11 +03:00
Ilya Gorbunov c53a2d57c3 Reformat stdlib: common code
#KT-5558
2018-04-27 00:50:16 +03:00
Ilya Gorbunov ad43c0f4cb Reformat stdlib: collections
#KT-5558
2018-04-27 00:49:06 +03:00
Ilya Gorbunov 502418e690 Put copyrights to the generated standard library sources
Read copyright template from .idea/copyright/apache.xml profile
2018-04-26 21:57:50 +03:00
Ilya Gorbunov e21c235bbb Add or update copyrights in the standard library sources 2018-04-26 21:57:50 +03:00
Ilya Gorbunov c239d346f7 Correctly indent upper bound separator in the generated stdlib code 2018-04-20 23:14:57 +03:00
Ilya Gorbunov 5381d0ed58 Move sequence operation classification higher than sample
Otherwise it gets eaten by that @sample tag.
2018-04-20 22:40:35 +03:00
Ilya Gorbunov 908d2d6975 Introduce kotlin-stdlib-generator dsl block for specifying sample reference 2018-04-20 22:40:35 +03:00
Ilya Gorbunov c5aed06110 Clarify docs for downTo and until 2018-04-20 05:25:31 +03:00
Ilya Gorbunov 501d969a38 Improve docs wording of zip function 2018-04-20 02:44:48 +03:00
Ilya Gorbunov 0eae27e03f Add samples for zip on sequences and strings 2018-04-20 02:00:36 +03:00
TakuyaKodama 2d4e591b5d Add samples for zip on arrays and collections
Write the sample references in the template and run the generator
2018-04-20 02:00:36 +03:00
Ilya Gorbunov 9dd87d89ba Remove default values in actual functions that have default values in expect
Remove suppressions about default values in expect declarations
2018-04-12 17:53:00 +03:00
Ilya Gorbunov f7b2eba680 Do not mix expect/non-expect overloads of minOf/maxOf
Workaround for KT-22520
2018-04-12 17:53:00 +03:00
Ilya Gorbunov 912c69aaa3 Suppress expect-actual mismatch for relaxed array extensions
Due to KT-21937
2018-04-12 17:53:00 +03:00
Ilya Gorbunov 1be55db681 stdlib-common: remove common migration typealias for Volatile annotation
Otherwise it gets to jvm stdlib as new API.
2018-04-12 17:53:00 +03:00
Ilya Gorbunov 0164f9b730 stdlib-common: correct common exception type declarations 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 10be42ddaa stdlib-common: suppress missing Comparator SAM constructor in JVM 2018-04-12 17:53:00 +03:00
Ilya Gorbunov d97707d6f7 Add JvmMultifileClass to preserve public API surface 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 69ebb3bfb0 Switch to the new stdlib source generation scheme
Remove old generated sources for stdlib-jvm and stdlib-js
2018-04-12 17:53:00 +03:00
Ilya Gorbunov 70236d4824 Build standard library for JVM from a single source set
Add explicit imports for kotlin.* and kotlin.text.* to prevent typealiases
conflicting with their aliased types from default imports.
2018-04-12 17:53:00 +03:00
gzoritchak 1c1fe10e12 Add samples for take* and drop* extensions (KT-20357)
- Add samples for take, takeLast, takeWhile, takeLastWhile
- Add samples for drop, dropLast, dropWhile, dropLastWhile
2018-02-20 19:24:27 +03:00
Yuta Sakata 4926b5a4c0 Add samples for any, all and none
Rewrite samples to make them working on sample generator

Move location of the class that contains samples of Aggregates.kt
2018-02-19 18:44:28 +03:00
gzoritchak f790635b30 Add samples for joinTo
KT-20357
2018-02-18 20:12:05 +03:00
gzoritchak 40e3159463 Add samples for joinToString
KT-20357
2018-02-18 20:12:05 +03:00
Yanis Batura 9c8c1cdc18 Fix a couple of typos in docs and ReadMe
* Fix a couple of typos
- In the main ReadMe.md
- In onEach template's doc

* Update generated source code
2018-02-12 14:22:47 +03:00
Ilya Gorbunov b456c52902 Import kotlin.coroutines.experimental for generated sequences on all platforms
This will add import to common generated sources
2018-02-02 17:56:56 +03:00
Ilya Gorbunov 32b68ae1d5 Rearrange platform specialized functions
Place them according to their operation to ArrayOps and Filtering.
2018-01-24 02:10:05 +03:00
Ilya Gorbunov 6197c5bf7f Add sample for coerceIn with floating point range
#KT-20357
2018-01-11 09:05:28 +03:00
Ilya Gorbunov 8fc83e3ff5 Add samples for coerceIn, coerceAtLeast, coerceAtMost for comparable types
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji 17573a3c21 Add samples for coerceIn
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji 4559da9848 Add samples for coerceAtMost
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji db607e231c Add samples for coerceAtLeast
#KT-20357
2018-01-11 09:05:27 +03:00
Jake Wharton 11696ac4c0 Implement String.toBoolean() for JS.
#KT-16348
2018-01-10 15:32:49 +03:00
Ilya Gorbunov 4e26ca5659 Add missing exception constructors to common and JS declarations
Add test to validate exception properties after calling various constructors.

Make NumberFormatException a descendant of IllegalArgumentException in all platforms.

#KT-21861 Fixed
#KT-21191 Fixed
2017-12-29 21:16:17 +03:00
Ilya Gorbunov b6595d661d Improve expect declarations in kotlin.text
- Replace overloads with default parameters in expect declarations by suppressing errors
- Remove meaningless inline modifier
2017-12-27 21:55:24 +03:00
Ilya Gorbunov 824b506abe Remove inheritance between LinkedHashSet/Map and HashSet/Map 2017-12-27 21:55:24 +03:00
Ilya Gorbunov c5c6eed170 Make common ArrayList declaration not open and implementing RandomAccess 2017-12-27 21:55:24 +03:00
Ilya Gorbunov fb13347864 Extract kotlin.collections expect classes into separate files
Add missing expect declarations for AbstractMutableMap/Set.
2017-12-27 21:55:24 +03:00
Ilya Gorbunov 93ef16deaf Move expect declarations to the appropriate packages
So that they match actual declarations in Kotlin/JVM stdlib.
2017-12-27 21:55:24 +03:00
Ilya Gorbunov 10639eaf6a Add pattern and options properties to common Regex
And add a test that accesses them and checks they work as expected.
2017-12-26 05:40:37 +03:00
Ilya Gorbunov bd4d847943 Fix unresolved references in the api docs
These were mostly incorrect parameter names and external api links.
2017-11-28 18:41:17 +03:00
Ilya Gorbunov dcd0a94d76 Minor: fix extra space in return type of chunked and windowed 2017-11-15 09:17:42 +03:00
Ilya Gorbunov 9305903e6c Remove deprecated pairwise function
It was replaced with zipWithNext.
2017-11-07 18:59:33 +03:00
Ilya Gorbunov ace9d0da94 Finalize math function parameter names
#KT-4900
2017-10-25 21:30:03 +03:00
Ilya Gorbunov 781ca6d2b5 Inline swap function, do not use deprecated floor. 2017-10-12 06:06:26 +03:00