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
kenji tomita
1db0e5c23e
Add samples for reversed list views
...
#KT-20357
2018-01-11 09:05:27 +03:00
AdamMc331
2fc26ba08f
Added samples for property delegates as part of KT-20357.
2018-01-11 09:05:27 +03:00
Ilya Gorbunov
c8bd623d69
Samples: add some operations to do with the constructed ranges
2018-01-10 15:32:51 +03:00
kenji tomita
4cb2b12f01
Add samples for range construction operators
2018-01-10 15:32:50 +03:00
Andre Perkins
31d650a041
Add sample for emptySet
2018-01-10 15:32:50 +03:00
Jake Wharton
11696ac4c0
Implement String.toBoolean() for JS.
...
#KT-16348
2018-01-10 15:32:49 +03:00
Ilya Gorbunov
a1f67e347f
Relax nullability of UninitializedPropertyAccessException constructor parameters
...
To make it consistent with other exception types
2017-12-29 21:16:17 +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
496df371f4
Provide the guide for sample authoring
2017-12-29 20:42:46 +03:00
Ilya Gorbunov
042f81f23b
Fix Volatile usages in common and JS code
2017-12-27 21:55:24 +03:00
Ilya Gorbunov
d2eb8b4a3f
Do not compile SynchronizedLazyImpl for platforms other than JVM
2017-12-27 21:55:24 +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
f468990f97
Add racing version of each Lazy test
...
Run several concurrent accesses to a lazy value
many times and validate invariants.
2017-12-26 23:14:11 +03:00
Ilya Gorbunov
4827aadcfd
Improve stability of lazy test, make some tests take less time
2017-12-26 23:14:09 +03:00
Ilya Gorbunov
934b3cc54e
Do not read volatile _value field second time it is already initialized
2017-12-26 23:14:07 +03:00
Ilya Gorbunov
5d62277fa5
Make SafePublicationLazyImpl.initializer volatile
...
This establishes happens-before relation between nulling out the initializer and
checking whether it is null. This will prevent the subsequent _value reads
being reordered before the initializer reads.
#KT-21868 Fixed
2017-12-26 23:13:14 +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
053f3b6ac0
Tests: use helper function to assert compile-time and run-time type check
...
To cleanup warnings about useless cast or type check that is always true.
2017-12-26 04:55:44 +03:00
Ilya Gorbunov
ecd42f14b3
Compile common stdlib tests against common stdlib
...
Declare platform-specific test utilities as expect.
2017-12-26 04:55:40 +03:00
Ilya Gorbunov
94a0e508d9
Use empty array instead of presized for Collection.toArray
...
#KT-21918
2017-12-21 20:10:28 +03:00
Ilya Gorbunov
d8cd926a8c
Do not leak primitiveness of an array wrapped with asList
...
A primitive array wrapped in a List with asList had incorrect implementation of toArray method:
while it declares that an object array is returned, it returned a primitive array.
Therefore the methods such as `Collection.toTypedArray()` and its dependents
`ArrayList(collection)`, `Collection + Iterable` might behave incorrectly
having relied on `toTypedArray` returned an object array.
#KT-21828 Fixed
2017-12-18 15:50:15 +03:00
Ilya Gorbunov
0b9830248d
Restore original accessor signature as deprecated
...
The deprecated function is not operator because it covers cases where it was used in explicit form.
#KT-18789
2017-12-07 20:26:53 +03:00
Ilya Gorbunov
7efaa7cabc
Allow delegating val properties to out-projected MutableMap
...
Change generic signature of MutableMap.getValue, use 'out @Exact V' and `V1: V` types instead of single `in V`.
Fix affected IR generation tests.
#KT-18789 Fixed
2017-12-07 20:26:53 +03:00
AJ Alt
8297fee615
Fix typo in File.copyTo KDoc
2017-12-06 18:11:11 +01:00
Ilmir Usmanov
d8c4d19152
Make suspendCoroutineOrReturn ordinary function
2017-12-01 20:18:04 +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
3f26fd3f7f
Provide summary for kotlin.math package
2017-11-28 18:41:15 +03:00
Ilya Gorbunov
cf076f3d25
Unify docs wording of 'trim*' functions
2017-11-28 17:59:05 +03:00
Ilmir Usmanov
0fbbe10143
Support suspendCoroutineUninterceptedOrReturn intrinsic
...
KT-17336: Fixed
2017-11-20 18:12:41 +03:00
Ilya Gorbunov
fdeb916111
Correct exclusions of kotlin-stdlib-js
2017-11-16 20:30:51 +03:00
Vladimir Kasatkin
9b49e9139c
Added samples for map filtering operators (KT-20357)
...
Fix map transformations sample names.
2017-11-15 23:58:51 +03:00
Ilya Gorbunov
dca23e339a
Improve iterator samples, add explanatory comments (KT-20357)
2017-11-15 23:58:49 +03:00
kenji tomita
4d13ea89b2
Add samples for iterator-related extensions (KT-20357)
2017-11-15 23:39:07 +03:00
Ilya Gorbunov
9de6dd814b
Docs: clarifications on LazyThreadSafetyMode
2017-11-15 17:41:43 +03:00
Ilya Gorbunov
27546546fa
Minor: specify explicit name for lambda parameter, use also instead of let
2017-11-15 12:01:22 +03:00
Sergey Ryabov
7fe7b6d6e1
Change FileReadWrite to more idiomatic code
2017-11-15 12:01:22 +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
f51974b271
Minor fix in comparison samples #KT-20357
2017-11-10 23:32:20 +03:00
scache
96e322c7d5
Add samples for Comparisons #KT-20357
2017-11-10 23:32:06 +03:00
Ilya Gorbunov
e16a0ba650
Improve and group samples for operations on Iterables #KT-20357
2017-11-10 23:31:50 +03:00
kenji tomita
75348dd0c0
Add samples for Iterables #KT-20357
2017-11-10 23:31:31 +03:00