Commit Graph

1840 Commits

Author SHA1 Message Date
Igor Laevsky a5ebd3c716 Re-generate built-ins 2022-01-01 21:46:55 +02:00
Sergej Jaskiewicz 599f705842 [stdlib] Make @LowPriorityInOverloadResolution applicable to ctors 2021-12-02 12:39:40 +00:00
Alexander Udalov 850d76f6bf Remove error on annotated types as arguments to typeOf
Instead, document that `KType.annotations` returns an empty list for
types created with `typeOf`. Annotations might be supported in the
future.

 #KT-49573 Fixed
 #KT-29919
2021-11-16 15:02:50 +01:00
Ilya Gorbunov 9456cd0f5d Improve Duration docs
- Document overflow situation in general
- Document possible rounding in operations involving Double
- Update kotlin.time package description
2021-10-22 11:51:48 +00:00
Ilya Gorbunov 0487261be8 Duration: postpone raising deprecation to error for top-level extension properties
#KT-46229
2021-10-19 09:29:16 +00:00
Abduqodiri Qurbonzoda f0a75e7843 Advance deprecation level of Experimental and UseExperimental annotations to ERROR 2021-10-17 21:14:36 +00:00
Ilya Gorbunov 9c4a2d4431 Leave all deprecated duration API experimental KT-46784 2021-10-06 13:51:23 +00:00
Abduqodiri Qurbonzoda f8bcba0b76 Align JS String.equals/compareTo(ignoreCase) behavior with JVM #KT-48999 2021-09-30 15:35:50 +00:00
Ilya Gorbunov c2af8b2a29 Leave Duration.convert experimental KT-46784 2021-09-30 14:31:54 +00:00
Ilya Gorbunov 193effc7c4 Fix Random.nextLong returning value out of range KT-47304
Correctly zero-extend the lower Int part of the Long being produced
2021-09-29 06:50:41 +00:00
Ilya Gorbunov af5ec9d289 Fix a typo in Typography object constants KT-46243 2021-09-27 14:55:19 +00:00
Ilya Gorbunov 7666377565 Control Duration init block assertions on JVM with -ea option
On other platforms enable them unconditionally
2021-09-24 16:17:54 +00:00
Ilya Gorbunov 21a9198fff Bring back Duration construction extensions KT-46229
Return the extension properties for constructing Duration from numbers,
but this time place them in Duration.Companion rather than on top-level.

- provide the new set of construction extension properties
  in companion of Duration
- leave top-level extension properties experimental,
  increase their deprecation level to ERROR,
  propose the extension properties in companion instead.
- leave Duration companion static factory functions experimental,
  deprecate them and propose the extension properties in companion instead.
2021-09-24 16:17:53 +00:00
Ilya Gorbunov 96611de344 Stabilize Duration, DurationUnit and related top-level functions KT-46784
Co-authored-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2021-09-24 16:17:53 +00:00
Ilya Gorbunov 40b5a7d449 Provide infix compareTo extension for Comparable<T> #KT-46423 2021-09-22 15:56:27 +00:00
Abduqodiri Qurbonzoda 261d0c2783 Promote collection builders to stable #KT-47421 2021-09-21 11:25:28 +00:00
Abduqodiri Qurbonzoda d9f8ce899a Promote rotateLeft and rotateRight to stable 2021-09-16 19:27:21 +03:00
Abduqodiri Qurbonzoda 34a50e4e34 Promote regex splitToSequence to stable 2021-09-16 19:26:33 +03:00
Abduqodiri Qurbonzoda f1befc0108 Format Other_Uppercase/Other_Lowercase property as an identifier in docs 2021-09-15 17:31:52 +03:00
Mikhail Glukhikh ffbd574a08 Use -opt-in instead of -Xopt-in in comments and scripts 2021-09-08 23:43:55 +03:00
Abduqodiri Qurbonzoda 94b371af5b Remove brittle ‘contains’ optimization in minus/removeAll/retainAll #KT-45438 2021-09-02 05:58:19 +03:00
Ilya Gorbunov fbc43cbebe Duration.toComponents: change the highest component type to Long 2021-09-02 02:44:16 +00:00
Ilya Gorbunov 0d58bb14b2 Duration: minor doc clarifications 2021-09-01 16:30:03 +00:00
Alexander Udalov 0b11d4214c Make typeOf stable since 1.6
#KT-45396 Fixed
2021-08-30 19:36:32 +02:00
Ilya Gorbunov 43a614ffcd Make builder collection implementations serializable KT-39328
Collections returned by collection builders are now serializable in
their read-only state.
The builder mutable collections inside collection builder lambda,
however, are not.
2021-08-24 23:13:57 +00:00
Abduqodiri Qurbonzoda 29ac9b33ca Add Duration.parse/parseIsoString samples 2021-08-05 10:32:33 +00:00
Abduqodiri Qurbonzoda d7b10f31b4 Add Regex splitToSequence samples 2021-08-05 10:32:32 +00:00
Mikhael Bogdanov 29f6ec4f40 Update defaultSnapshotVersion to 1.6.255-SNAPSHOT 2021-07-29 19:45:54 +02:00
Abduqodiri Qurbonzoda b65c477e68 Regex.splitToSequence, CharSequence.splitToSequence(Regex) #KT-23351 2021-07-20 14:09:24 +00:00
Abduqodiri Qurbonzoda 1fee6b191f Fix typo in Sequence.constrainOnce() doc 2021-07-20 14:09:24 +00:00
Ilya Gorbunov 5072653957 Duration: parse explicit positive values parenthesized 2021-07-12 04:39:28 +00:00
Ilya Gorbunov 682cb8e34a Duration default toString: use 0, 1, 2, 3, 6, or 9 decimal digits
KT-42851
2021-07-12 04:39:27 +00:00
Ilya Gorbunov 7551719b85 Duration parsing: simplify range checks 2021-07-12 04:39:27 +00:00
Ilya Gorbunov 0427eec20f Quote invalid strings in exception messages 2021-07-12 04:39:26 +00:00
Ilya Gorbunov 3f6e2be687 Duration: do not use scientific format for large values
The largest duration value formatted in ns with maximal decimals
would fit in 40 chars.
2021-07-12 04:39:25 +00:00
Ilya Gorbunov 1be1e5279c Duration: parse and format negative values parenthesized 2021-07-12 04:39:25 +00:00
Ilya Gorbunov ca1a9e4ca3 Duration: longer than long values in ISO components, test negative cases 2021-07-12 04:39:24 +00:00
Ilya Gorbunov 1c6ab08220 Introduce functions to parse a duration from a string KT-45325 2021-07-12 04:39:23 +00:00
Ilya Gorbunov 7ab6f6c9b2 Change Duration.INFINITE.toIsoString representation 2021-07-12 04:39:23 +00:00
Ilya Gorbunov ae3d9cc3cd Small durations are formatted with sub-second units KT-42851 2021-07-12 04:39:22 +00:00
Ilya Gorbunov 150ce812f1 Use days component in the default duration format KT-42851 2021-07-12 04:39:21 +00:00
Ilya Gorbunov 255c4b405e Duration: round Double value to Long ns instead of truncating it KT-47675 2021-07-12 04:39:21 +00:00
Ilya Gorbunov 42cd2e65e6 Change Duration.toString format KT-42851 2021-07-12 04:39:20 +00:00
Abduqodiri Qurbonzoda d934c97bf5 Equivalize isLowerCase and isUpperCase behavior in all platforms #KT-46184 2021-05-31 13:42:46 +03:00
Abduqodiri Qurbonzoda 54994a289f Support all digit chars on JS and Native #KT-46002 2021-05-27 06:56:52 +03:00
Abduqodiri Qurbonzoda 57c4f79c1c Update Char.digitToInt documentation 2021-04-20 04:36:05 +03:00
Abduqodiri Qurbonzoda bb2a50a4eb Fix Char.isISOControl doc 2021-04-19 19:14:17 +03:00
Abduqodiri Qurbonzoda 3a8d1c4b5e Remove redundant @OptIn 2021-04-16 19:01:28 +03:00
Ilya Gorbunov ce7092a638 More efficient Char(Int) in common, JS, and JS-IR 2021-04-16 03:58:34 +03:00
Abduqodiri Qurbonzoda 33b44585c4 Deprecate sumBy and sumByDouble with WARNING 2021-04-08 03:48:01 +03:00