Commit Graph

343 Commits

Author SHA1 Message Date
Ilya Gorbunov 47d580cbc5 Inline-only in kotlin.text 2016-02-01 22:09:11 +03:00
Ilya Gorbunov 56c5758db1 Inline-only in kotlin and kotlin.system packages, split Float/Double extension implementations for JVM and JS to make them inline-only in JVM. 2016-02-01 22:09:10 +03:00
Alexander Udalov 04026dbe84 Make Array<T>(size, init) a constructor of Array
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Alexander Udalov 9e8b6571f4 Make primitive array factory functions constructors 2016-01-28 03:10:19 +03:00
Ilya Gorbunov 8d02467e6d Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>
#KT-9992 Fixed
2016-01-27 00:00:01 +03:00
Ilya Gorbunov 23080f78f7 Map.getOrPut: treat nulls as missing values. 2016-01-26 11:49:18 +03:00
Denis Zharkov 982dfa9183 Minor. Specify variables type explicitly
It's needed because 'assertEquals' has 'OnlyInputType' annotation
on type parameter, and type of 're.exec(string)!!' is 'Array<String?>',
while 'arrayOf("A5D5", "A5", "D5")' is 'Array<String>'
2016-01-22 19:17:22 +03:00
Ilya Gorbunov 768a23f7eb Drop deprecations: functions that were converted to properties. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 91f4cf0ebc Drop Progression<T> and its deprecated properties: start, end, increment.
Drop deprecated range extensions.
Make progression constructors private.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov 7896e58afc Rename sequence function to generateSequence 2016-01-22 01:13:31 +03:00
Ilya Gorbunov dbcad08a35 Regex: MatchResult.groupValues do not exclude zeroth group, use the same indices as in groups collection.
Provide destructured property for destructured assignment.
2016-01-22 00:59:13 +03:00
Ilya Gorbunov 3459a24b0a Regex: Introduce MatchResult.groupValues to get list of numbered group values exlcuding zeroth group with the entire match. 2016-01-22 00:56:08 +03:00
Ilya Gorbunov 5bbce7a1de Deprecate 'comparator { ... }' in favor of Comparator SAM-constructor. Provide SAM-like constructor for JS. 2016-01-18 21:46:32 +03:00
Ilya Gorbunov 67ef790abc Move comparison related functions to kotlin.comparisons, update imports in stdlib. 2016-01-18 21:46:31 +03:00
Ilya Gorbunov f91c01919b kotlin.test: 'fail' returns Nothing, 'assertFails' returns Throwable (not nullable).
Js tests now fail at the first failed assertion.
#KT-10289 Fixed
#KT-10369 Fixed
2016-01-14 06:03:40 +03:00
Ilya Gorbunov f9ba35af64 Place Char constants into builtin Char companion object. 2015-12-24 06:18:51 +03:00
Ilya Gorbunov de11ed4fc6 Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
2015-12-24 06:17:03 +03:00
Ilya Gorbunov 03816373b3 Primitive array constructor-like functions with init lambda.
#KT-8831

Update testData and resolve ambiguity in newArray test
2015-12-18 17:54:09 +03:00
Ilya Gorbunov 188119aa83 Prepare to treat keys mapped to null same way as missing keys in Map extensions: getOrElse, getOrPut, getOrImplicitDefault. 2015-12-18 15:24:03 +03:00
Ilya Gorbunov 055c71e8d0 Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
#KT-9002 Fixed
2015-12-18 00:00:52 +03:00
Mikhail Glukhikh 233e8e58e8 Code cleanup: get rid of unnecessary !! / as, fake warning comments and issues 2015-12-15 12:00:58 +03:00
Ilya Gorbunov f509937037 Move array constructors to builtins module back to kotlin package. 2015-12-14 04:29:11 +03:00
Ilya Gorbunov 871c5c66b4 Move code between packages (JS) 2015-12-14 03:49:46 +03:00
Ilya Gorbunov dd2ae15531 Move code between packages. 2015-12-14 03:49:45 +03:00
Alexey Tsvetkov 199827635f Reserve 'typeof' as a keyword 2015-12-10 21:26:41 +03:00
Yan Zhulanow d21985493e Mark functions with 'operator' in JS stdlib 2015-11-27 15:51:11 +03:00
Yan Zhulanow 278f1cd6ef Fix "Placing function type parameters after the function name" errors in project 2015-11-27 15:51:11 +03:00
Ilya Gorbunov 0dbbb6c19c Rename operand parameter of plus and minus for collections 2015-11-21 00:54:37 +03:00
Ilya Gorbunov 7e7a55bbe4 StdLib: Rename method parameters (Strings) 2015-11-21 00:54:19 +03:00
Ilya Gorbunov a3cd86d2cd StdLib: Rename method parameters (Collections) 2015-11-21 00:54:16 +03:00
Ilya Gorbunov 0579f6c8bf Replace Regex.match and matchAll usages 2015-11-11 18:59:55 +03:00
Ilya Gorbunov 8bdd1e3246 Sorting optimizations: do not make excessive copies, introduce methods to sort the whole array.
#KT-9904 Fixed
2015-11-11 03:29:40 +03:00
Sergey Mashkov 29973d714e Remove DOM utilities, put temporary to JS to keep compatibility 2015-11-05 14:41:28 +01:00
Sergey Mashkov e9fbebaea2 JS: drop deprecated declarations 2015-11-05 14:41:28 +01:00
Ilya Gorbunov 5e9b7b9e60 Collections.sort without comparator now uses natural order.
#KT-9771 Fixed
2015-11-05 09:03:30 +03:00
Ilya Gorbunov 4fc54a12b8 In-place reversing.
#KT-9034
2015-11-05 09:02:58 +03:00
Ilya Gorbunov e155e426c2 Implement CharSequence.regionMatches and generalize depending String extensions to take CharSequence.
Add hidden declarations for replaced overloads with String receiver in hand-written code.
2015-11-04 22:19:31 +03:00
Ilya Gorbunov 4a621cbb5f Generalize String extensions to take CharSequence as receiver and parameters where applicable. 2015-11-04 22:19:24 +03:00
Ilya Gorbunov 59f88cfb52 Ensure vararg copy behavior for specific case of arrayListOf in JS. 2015-10-16 18:43:41 +03:00
Ilya Gorbunov 446cdc087d Optimizations in listOf and arrayListOf constructor functions.
Remove linkedListOf() from JS.
#KT-5703 Fixed
#KT-8519 Fixed
2015-10-16 18:28:43 +03:00
Ilya Gorbunov 43bb9347c6 Rename Regex.hasMatch to containsMatchIn, and add corresponding contains function to CharSequence. 2015-10-14 22:49:50 +03:00
Ilya Gorbunov d1d865aa0f Rename methods in Regex. Add matchEntire method to match entire string against regex. 2015-10-14 22:49:48 +03:00
Ilya Gorbunov d860f335a3 JS: Make StringBuilder implement CharSequence and introduce secondary constructors. 2015-10-14 22:49:47 +03:00
Michael Nedzelsky 57205f5721 drop BASE_WITH_NULLABLE_UPPER_BOUND 2015-10-14 20:51:01 +03:00
Mikhail Glukhikh 78cfeb0d7d Stdlib rename: List.indexOf(T), List.lastIndexOf(T), MutableCollection.removeAll(Collection<T>), MutableCollection.retainAll(Collection<T>) 2015-10-14 20:40:09 +03:00
Denis Zharkov 6322198a11 Revert 'isEmpty' transformation 2015-10-14 20:40:01 +03:00
Denis Zharkov 6fa8083a70 Transform builtin Map declaration and adjust stdlib 2015-10-14 20:39:38 +03:00
Ilya Gorbunov 6d7cc0671e Allow equals with ignoreCase parameter to take nullable Strings both as a receiver and a parameter.
#KT-9188
2015-10-14 18:19:56 +03:00
Pavel V. Talanov 2e75f7f103 Js stdlib: noImpl property has 'Nothing' type 2015-10-14 13:41:56 +03:00
Ilya Gorbunov 2cdd413590 StdLib generators: Add some infix extensions for DSL, remove unneeded import, simplify declarations. 2015-10-13 22:23:13 +03:00