Commit Graph

1849 Commits

Author SHA1 Message Date
Ivan Kylchik 1564f2c549 Mark all declarations that will be evaluated with ir interpreter 2022-05-18 21:19:54 +03:00
Ilya Gorbunov a03999fe81 Rename DefaultTimeMark to TimeSource.Monotonic.ValueTimeMark 2022-04-14 16:54:32 +00:00
Ilya Gorbunov 77cf41c189 Saturate overflowing values when adjusting time marks
KT-46132
2022-04-14 16:54:31 +00:00
Ilya Gorbunov fede70d0d5 Make TimeMark returned by TimeSource.Monotonic a value class
This value class wraps Long on JVM and Native thus reducing allocations
in time measurement scenarios when the default monotonic time source is
statically known.

KT-46132
2022-04-14 16:54:30 +00:00
Kevin Bierhoff 9fe6e97cb8 Extensions for java.util.Optional (KT-50484)
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2022-04-13 14:34:06 +03:00
Ilya Gorbunov b35c571a23 Remove deprecated sequence and iterator builders
They were originally provided for migration from experimental coroutines

#KT-26678
2022-04-12 15:03:39 +00:00
Abduqodiri Qurbonzoda c3f5d03b36 [JS] Support named capture groups in Regex #KT-51775 2022-04-05 15:21:25 +00:00
Vsevolod Tolstopyatov cf79752c14 Stabilize deepRecursiveFunction and DeepRecursiveScope
#KT-51848
2022-04-05 12:49:35 +00:00
Mikhail Glukhikh 53d6ac24e5 Switch kotlin version to 1.7
* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
2022-02-25 11:46:27 +00:00
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