Commit Graph

1361 Commits

Author SHA1 Message Date
Ilya Gorbunov aafd79078f Provide mutableSetOf and mutableMapOf
#KT-9663 Fixed
2016-01-18 21:46:29 +03:00
Ilya Gorbunov fe8ba4d356 Provide mutableListOf.
Deprecate linkedListOf.
#KT-9663
2016-01-18 21:46:28 +03:00
Ilya Gorbunov 57dcbe0aea Cleanup in libraries and tools: use property access syntax. 2016-01-17 15:52:14 +03:00
Ilya Gorbunov 19a4f65fd1 Cleanup in libraries 2016-01-17 15:52:12 +03:00
Ilya Gorbunov 3d5e415c87 Annotate Iterable.forEach and Map.forEach with HidesMembers.
#KT-10538 Fixed
#KT-10479 Fixed
2016-01-16 15:33:12 +03:00
Ilya Gorbunov 56ddd496c5 Hide listFiles as it's no more preferred by overload resolution over synthetic SAM invocations.
#KT-10652 Fixed
2016-01-15 23:53:44 +03:00
Stanislav Erokhin b185316a6e Create new HidesMembers annotation 2016-01-15 23:32:34 +03:00
Denis Zharkov be2f857670 Introduce inline-only functions
They have private visibility in bytecode
2016-01-15 09:46:30 +03:00
Ilya Gorbunov 7ddac1945e Unify functional parameter name for 'let', 'run', 'with', 'apply' scope function with 'use' and 'synchronize'. 2016-01-14 18:31:57 +03:00
Ilya Gorbunov 4eb3cff129 Unify functional parameter name for 'forEachLine', 'forEachBlock', 'repeat' methods with 'forEach' 2016-01-14 18:31:56 +03:00
Ilya Gorbunov c9ddea6d03 Breaking: File.(buffered)reader/writer now returns less specific InputStreamReader/OutputStreamReader and use UTF-8 encoding by default, allowing to specify different encoding with optional parameter.
File.printWriter supports specifying Charset and uses UTF-8 by default.
#KT-10454 Fixed
2016-01-14 18:31:55 +03:00
Ilya Gorbunov a64c1ff0f4 Rename defaultBufferSize to DEFAULT_BUFFER_SIZE. 2016-01-14 18:31:43 +03:00
Ilya Gorbunov d64882e19b File.useLines and Reader.readLines. 2016-01-14 18:30:45 +03:00
Ilya Gorbunov ac15807ba4 Deprecate functions taking charset name as string. 2016-01-14 18:30:42 +03:00
Ilya Gorbunov 68971e2162 Remove redundant JvmName annotations for Array.copyOf, copyOfRange 2016-01-14 18:30:41 +03:00
Ilya Gorbunov b99e1111f6 Do not use out projection for Array where appropriate. 2016-01-14 18:30:40 +03:00
Ilya Gorbunov eb5b5331fb Minor: reorder invariant arrays of objects in generated code 2016-01-14 18:30:39 +03:00
Ilya Gorbunov 362e463b26 Preserve type projection for Array.requireNoNulls.
#KT-10039 Fixed
2016-01-14 18:30:37 +03:00
Ilya Gorbunov 90a33fb19c Make return type more specific for File.inputStream and File.outputStream, for String.byteInputStream 2016-01-14 18:30:20 +03:00
Ilya Gorbunov ea3a2eefe7 File.deleteRecursively returns true even if path specified by File does not exist.
False is returned only in case of incomplete deletion.
Distinguish situations when file was not deleted because it's vanished after listing and because of some other error.
2016-01-14 18:14:12 +03:00
Ilya Gorbunov 5e6489f1a2 Minor: refactor file utils test not to use 'assert' to make test assertions. Use assertTrue, assertFalse, assertEquals, assertFailsWith instead. 2016-01-14 18:14:11 +03:00
Ilya Gorbunov 3ee9c2b9d8 Introduce exitProcess(status) returning Nothing.
#KT-10441 Fixed
2016-01-14 18:14:10 +03:00
Dmitry Petrov c97294a066 stdlib fixes:
- 'sequence(initialValue: T?, ...)' should have LowPriorityInOverloadResolution
(otherwise 'sequence({...}, {...})' is ambiguous).
- 'copyOf' and 'copyOfRange' should be defined for 'Array<T>' only
('Array<out T>' version always loses to 'Array<T>', since the second one
is always more specific).
2015-12-30 10:44:00 +03:00
Michael Bogdanov e671d05105 Companion public val annotated with @JvmFIeld or const 2015-12-29 16:45:23 +03:00
Alexander Udalov 75f046fa81 Drop Throwable#printStackTrace, make it a JVM-specific extension 2015-12-25 20:16:18 +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
Mikhail Glukhikh 99a32b93fb Implemented missed checks for local functions #KT-10449 Fixed
Relevant code/test fixes
2015-12-23 18:22:32 +03:00
Alexander Udalov c10cc30f40 Drop kotlin.jvm.internal.Intrinsic, use only one mechanism for intrinsics 2015-12-21 20:28:40 +03:00
Sergey Mashkov 5ad0a84039 rename kotlin.test to kotlin-test 2015-12-21 15:10:24 +03:00
Ilya Gorbunov 0a1f4d6088 Deprecate IndexingIterable and IndexingIterator and provide Iterator.withIndex() instead of the latter. 2015-12-19 09:56:52 +03:00
Ilya Gorbunov fbfeb98ecf Deprecate some top-level constants to make 'em private later. 2015-12-19 09:56:46 +03:00
Stanislav Erokhin 1574dc78df Synthetic extensions wins against top-level extension. 2015-12-18 22:49:25 +03:00
Sergey Mashkov a97e623d04 kotlin-test: binary compatibility for fail function 2015-12-18 22:17:48 +03:00
Sergey Mashkov a5b098c4a7 kotlin.test: Rename jvm module to junit 2015-12-18 22:16:04 +03:00
Sergey Mashkov 149ce70ce2 Move testing from stdlib to js.stdlib 2015-12-18 22:16:04 +03:00
Sergey Mashkov 1867abbbe7 Add kotlin.test library 2015-12-18 22:16:04 +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
Ilya Gorbunov b5e637bed5 Rename toMap with selector and transform to toMapBy 2015-12-17 22:50:44 +03:00
Ilya Gorbunov 544bc9a70c Introduce toMap with key-value pair selector.
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov 2966420d24 Harden deprecation level for synchronized helper functions.
Make migration helper classes deprecated-hidden, although it doesn't affect anything.
2015-12-17 22:48:13 +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 4ffd60cf52 Correct deprecation messages. 2015-12-14 21:07:33 +03:00
Ilya Gorbunov 43ce8222fc Soften deprecation level to ease migrations. 2015-12-14 21:05:13 +03:00
Ilya Gorbunov 9d753f24b7 Do not create regex to split path by directory separator char. 2015-12-14 06:31:44 +03:00
Ilya Gorbunov a4f82a2dc4 Sensible behavior for File.startsWith and File.endsWith 2015-12-14 06:10:26 +03:00
Ilya Gorbunov d2e22dc794 Fix tests on linux.
Add tests for File.startsWith
2015-12-14 06:10:24 +03:00
Ilya Gorbunov 645c78e2f4 Do not use assert in test, use assertTrue or assertEquals 2015-12-14 06:10:22 +03:00