Commit Graph

3170 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda 54994a289f Support all digit chars on JS and Native #KT-46002 2021-05-27 06:56:52 +03:00
Anton Bannykh 6633a9edc0 [JS IR] add a flag which enable safe property access
If an accessor is not available at runtime we fall back
to the property access.

This is useful in cases when JS objects are casted to Kotlin
classes implicitly. This pattern did work in the old BE, which
lead to a significant amount of code which doesn't work anymore.
2021-05-20 16:37:34 +03:00
Ilya Gorbunov ed3542cdf5 Support covariant MutableMap.entries.remove in JS/IR
Workaround for KT-43321
Follow up to KT-41278
2021-04-26 17:45:27 +03:00
Ilya Gorbunov a9cc046ec9 Add missing constructor for expect annotation class JvmRecord
KT-46280
2021-04-26 10:41:49 +00:00
Ilya Gorbunov b59f668a50 Change the way kotlin.js source map paths are postprocessed
The idea is that we do no longer use `sourceMapBaseDirs` parameter
of `compileKotlin2Js` task to remove prefix from source paths,
but instead preserve the full paths relative to the output directory.
This allows us to avoid duplicate file names and to identify
source files more reliably.
Then, after sources have been embedded in the source map, we remove
several relative prefixes from source paths.
2021-04-26 13:13:21 +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 d1f18c4651 Add @see doc references to java isUpperCase and isLowerCase 2021-04-19 19:14:14 +03:00
Abduqodiri Qurbonzoda 22dcc92951 Fix Char.isTitleCase doc 2021-04-19 19:14:13 +03:00
Abduqodiri Qurbonzoda 36aee8f2b4 Fix String.replace doc 2021-04-19 19:14:10 +03:00
Abduqodiri Qurbonzoda dab09e7052 Fix CharSequence.repeat doc 2021-04-19 19:14:08 +03:00
Abduqodiri Qurbonzoda 3a8d1c4b5e Remove redundant @OptIn 2021-04-16 19:01:28 +03:00
Abduqodiri Qurbonzoda f253b1fb15 Incorrect description for JVM toUpperCase method #KT-45884 2021-04-16 19:01:09 +03:00
Ilya Gorbunov ce7092a638 More efficient Char(Int) in common, JS, and JS-IR 2021-04-16 03:58:34 +03:00
Alexander Udalov 168d8b07a8 Minor, fix warnings on new stdlib API
In modules where allWarningsAsErrors is not yet enabled.
2021-04-15 18:39:06 +02:00
Abduqodiri Qurbonzoda 98d31a1813 Expand KDoc of inc() and dec() operators #KT-43701 2021-04-10 03:23:04 +03:00
Ilya Gorbunov d062f54360 Remove test exclusions after KT-45136 is fixed 2021-04-09 06:45:11 +03:00
Abduqodiri Qurbonzoda 46338224e1 Remove deprecated JQuery 2021-04-08 18:43:16 +03:00
Mikhail Glukhikh addfa27980 Fix various EXPOSED_FROM_PRIVATE_IN_FILE deprecations 2021-04-08 09:41:25 +03:00
Abduqodiri Qurbonzoda 33b44585c4 Deprecate sumBy and sumByDouble with WARNING 2021-04-08 03:48:01 +03:00
Abduqodiri Qurbonzoda aa543c6631 Migrate stdlib, tests and samples to new case conversion api 2021-04-08 03:22:01 +03:00
Abduqodiri Qurbonzoda f99c72cc98 Remove redundant @OptIn targeting new case conversion api 2021-04-08 03:21:59 +03:00
Abduqodiri Qurbonzoda cbef9dad36 Deprecate old Char and String case conversion api #KT-43023 2021-04-08 03:21:57 +03:00
Ilya Gorbunov b64b96eee6 Deprecate Char-to-Number conversions in stdlib (JVM and JS)
- Int.toChar was left non-deprecated because the replacement is not intrinsic yet.
- Number.toChar was left non-deprecated because otherwise the deprecation propagates to the override, Int.toChar.

KT-23451
2021-04-07 18:30:20 +03:00
Ilya Gorbunov 22ca412dd2 Fix case-insensitive character-wise comparison KT-45496
- Step 1: add failing tests
- Step 2: fix common case insensitive Char.equals
- Step 3: fix case insensitive String.equals in K/JS
- Step 4: enable unicode case folding in K/JS Regexes and
  string replacement (KT-45928)
- Step 5: fix case insensitive char comparison in K/N in String functions
  String.replace, equals, compareTo with ignoreCase
2021-04-07 14:43:41 +03:00
Abduqodiri Qurbonzoda b0f1ddc91e Advance max/min(By/With) deprecation level to ERROR 2021-04-07 07:49:23 +03:00
Ilya Gorbunov d70edeb38b Hide deprecated JS Math object from public API and rename to JsMath
KT-41318

- Rename Math to JsMath and remove unused functions
- Fix return types, remove duplicating JsMath from longjs.kt

Co-authored-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2021-04-07 00:39:47 +03:00
Abduqodiri Qurbonzoda d9ab96126d Advance deprecation level of mixed Int/FP overloads of ClosedRange.contains to HIDDEN KT-22423 2021-04-07 00:23:34 +03:00
Abduqodiri Qurbonzoda d28d0a6321 Advance String(CharArray) deprecation level to ERROR in Common and JS 2021-04-07 00:23:29 +03:00
Abduqodiri Qurbonzoda 29040d6f53 Remove deprecated Clock and ClockMark 2021-04-07 00:23:28 +03:00
Abduqodiri Qurbonzoda abcc572b97 Remove deprecated scanReduce and scanReduceIndexed 2021-04-07 00:23:26 +03:00
Abduqodiri Qurbonzoda 968099fbec Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360 2021-04-07 00:23:20 +03:00
Abduqodiri Qurbonzoda e8992c5d19 Advance deprecation level of InputStream.readBytes(estimatedSize) to ERROR 2021-04-06 18:42:53 +03:00
Ilya Gorbunov f1cdd0e2ed Add description for kotlin.io.path package 2021-04-06 14:24:43 +03:00
Ilya Gorbunov 81f2aea316 Stabilize existing Path API and annotate with @Throws where appropriate
KT-45913
2021-04-06 14:24:42 +03:00
Ilya Gorbunov 35ae913a5e Stabilize new string and char case conversion API KT-45873 2021-04-03 10:39:17 +03:00
Ilya Gorbunov 256f634e61 Support all digit chars in digitToInt on JVM KT-23451 2021-04-03 10:30:50 +03:00
Ilya Gorbunov 8b85bae020 Stabilize Char-to-Int conversions KT-45874 2021-04-03 10:30:50 +03:00
Ilya Gorbunov 0e93924ff3 Duration: inWholeUnits properties instead of inUnits
Introduce conversion properties returning Long values,
deprecate the old ones returning Doubles.
2021-04-02 17:44:10 +03:00
Ilya Gorbunov 11d15f3343 Make Duration storage ranges symmetric and non-overlapping
Increase accuracy of multiplication and division.
2021-04-02 17:44:10 +03:00
Ilya Gorbunov 4fd2254f3f Advance TestTimeSource more precisely
Change durations in its test so that they hold precise number
of nanoseconds
2021-04-02 17:44:08 +03:00
Ilya Gorbunov fa7460ba48 Store Duration value as a multi-range Long
Now precision loss happens at bigger durations.

This changes the binary API due different underlying type of Duration.
2021-04-02 17:43:20 +03:00
Ilya Gorbunov 94240f7b21 Stabilize unsigned types KT-45653
Deprecate specialized unsigned iterators for removal.

Fix compiler tests:
- drop unsignedLiteralsOn1_2 because apiVersion 1.2 is no longer supported
- drop experimental unsigned literals diagnostic test
2021-03-31 19:05:04 +03:00
Nikolay Krasko a5e445492f Move Bintray js-externals to Space (KTI-528) 2021-03-26 21:08:46 +03:00
Dmitriy Dolovov 9aa16faa27 Test integer overflow on div/rem of Int.MIN_VALUE by -1
^KT-45136
2021-03-24 09:55:52 +03:00
Svyatoslav Scherbina 8b3ff11a2b Provide CName annotation in common stdlib as optional 2021-03-22 09:20:05 +00:00
Svyatoslav Scherbina 552bd108a9 stdlib: rename NativeAnnotationsH.kt -> NativeConcurrentAnnotations.kt
Also move it from libraries/stdlib/common/src/kotlin
to libraries/stdlib/src/kotlin/annotations
2021-03-22 09:20:05 +00:00
Anastasiya Shadrina 94c4d1c23e Specify when the range is empty in KDoc 2021-03-19 20:40:06 +07:00
Mikhail Bogdanov 95654bb9bc Deprecate @JvmDefault
#KT-40392 Fixed

(cherry picked from commit c11f38688e)
2021-03-13 08:24:17 +00:00
Abduqodiri Qurbonzoda ff5b2404af Introduce firstNotNullOf and firstNotNullOfOrNull #KT-12109 2021-03-12 09:27:14 +03:00