Commit Graph

22602 Commits

Author SHA1 Message Date
Michael Nedzelsky bfc641caba JS: fix tests for -meta-info 2015-05-21 02:30:57 +03:00
Michael Nedzelsky d629271510 JS: make -meta-info cli option boolean 2015-05-21 02:30:54 +03:00
Michael Nedzelsky 572ce47c25 add tests for serializaion of nested classes and objects (builtins and js) 2015-05-21 02:30:38 +03:00
Michael Nedzelsky 6b64dcc4ee JvmProtoBuf: reuse one instance of ExtensionRegistryLite 2015-05-21 02:30:35 +03:00
Michael Nedzelsky ea8234adb9 convert JvmProtoBufUtil.java to kotlin, step 2: convert content 2015-05-21 02:30:32 +03:00
Michael Nedzelsky 2a6cd3dd96 convert JvmProtoBufUtil.java to kotlin, step 1: rename extentsion 2015-05-21 02:30:27 +03:00
Pavel V. Talanov cfdb1f4ec3 Refactor creation of ModuleDescriptor
Add storageManager to ModuleDescriptorImpl (to be used later)
Extract ModuleParameters to hold default imports and platform class map
Introduce MutableModuleContext to simplify module creation code
2015-05-20 19:45:50 +03:00
Ilya Gorbunov 6a3cb0eff8 Provide distinctBy(keySelector) method for collections and sequences.
Implement distinct() and toMutableSet() for sequences.
Breaking change: distinct() now returns List instead of Set.

#KT-5834 Fixed
#KT-6063 Fixed
2015-05-20 19:28:47 +03:00
Ilya Gorbunov 46d91b2606 Add test for toMap with key selector and value transform. 2015-05-20 19:28:45 +03:00
Ilya Gorbunov 85e637b1e7 Revert toArrayList for primitive arrays back to trivial implementation.
Use newly introduced Int.MAX_VALUE in JS.
Inline mapCapacityForValues function.
Precalculate capacity of linked hash set being created with toMutableSet function.
2015-05-20 19:28:44 +03:00
Danny Thomas 7ce0487b7e Collection performance improvements
Lists

- For arrays, use Arrays.asList, then toArrayList making the list creation an array copy
- For the same reason, use the ArrayList(Collection) constructor
- Replace duplicate code in toList, instead calling toArrayList

Maps/Sets

- Where the size of the source is known, precalculate the capacity, using the formula used by Guava's Maps class
- For toMap where we're unable to get at the private function, use HashSet's formula where the size is known
- Add a toMap that takes a selector and a transform, avoiding a separate step for transforming values
2015-05-20 19:27:44 +03:00
Svetlana Isakova 0e6babc96b Converted IdeRenderers to kotlin 2015-05-20 15:19:31 +02:00
Svetlana Isakova 61df8c55e4 Rename IdeRenderers to kt file 2015-05-20 15:19:31 +02:00
Evgeny Gerashchenko 7dbc08f048 Moved util function to util package. Also to avoid top-level functions in same package of different targets. 2015-05-20 15:48:07 +03:00
Valentin Kipyatkov ce4fa6b0f1 KT-4774 Hotkey conflict for "select all occurrences" and "convert java file to kotlin file"
Changed shortcut to Ctrl-Alt-Shift-K

 #KT-4774 Fixed
2015-05-20 14:01:58 +03:00
Valentin Kipyatkov d91ee03e9e KT-7178 Converter from Java drops the result when there is already a file with the same name
#KT-7178 Fixed
2015-05-20 14:01:58 +03:00
Valentin Kipyatkov 0b809453b5 Fixed KT-7682 Conversion from Java to Kotlin - converted file is not added automatically to VCS
#KT-7682 Fixed
2015-05-20 14:01:58 +03:00
Sergey Mashkov 4695aed993 Replace trait with interfaces in JavaScript stubs 2015-05-20 14:01:03 +03:00
Sergey Mashkov 9b24a9b73b Maven: fix test data for project configurator 2015-05-20 13:45:14 +03:00
Sergey Mashkov f9ab08ed47 Maven: maven configurator shouldn't add resources directory to sources list
#KT-7781 Fixed
2015-05-20 13:45:13 +03:00
Sergey Mashkov 6c59a311fb Maven: Maven IDEA configurator also configures tests for JavaScript 2015-05-20 13:45:13 +03:00
Denis Zharkov 6df805d6f2 Refine diagnostics reported on implicit constructor delegation call
- Do not report anything else if primary's call expected

- Do not repeat EXPLICIT_DELEGATION_CALL_REQUIRED

 #KT-7230 Fixed
2015-05-20 09:24:57 +03:00
Denis Zharkov 87be626848 Add quickfix for deprecated labels syntax 2015-05-20 09:24:57 +03:00
Denis Zharkov e98b9ea84e Save annotations of lambda on SAM's method
Also add tests checking that annotations on 'invoke' methods of common lambdas are saved properly

 #KT-6932 Fixed
2015-05-20 09:24:57 +03:00
Denis Zharkov e078eaf15b Resolve annotations on lambda's descriptor
Also add test checking functional expression
2015-05-20 09:24:57 +03:00
Denis Zharkov fd4946e552 Annotate $default-method with same annotations as original
#KT-6930 Fixed
2015-05-20 09:24:57 +03:00
Denis Zharkov 5b1f3080d3 Add quickfix removing names of function expressions 2015-05-20 09:24:57 +03:00
Denis Zharkov b650753643 Change formatting of function expressions without names
No spaces between 'fun' and value parameter list
2015-05-20 09:24:56 +03:00
Denis Zharkov 2deb7faf05 Deprecate function expressions with names 2015-05-20 09:24:56 +03:00
Denis Zharkov aa1548a83b Report obsolete labels syntax deprecation on objects
#KT-7771 Fixed
2015-05-20 09:24:56 +03:00
Denis Zharkov 5297b4974f Adjust descriptor renderer to latest parsing changes
- `constructor` keyword expected in primary constructor with non-empty modifier list
- annotation list should be preceeded by '@'
2015-05-20 09:24:56 +03:00
Denis Zharkov dd14b36921 Prohibit unescaped annotations on primary constructor of local class 2015-05-20 09:24:56 +03:00
Denis Zharkov 89337ff51e Change deprecation rules for annotations in brackets
Also adjust quickfix for deprecated syntax
2015-05-20 09:24:56 +03:00
Denis Zharkov e4f54b5d2e Parsing: support '@[ann1 ann2]', '@file:ann' and '@file:[ann]' cases 2015-05-20 09:24:56 +03:00
Denis Zharkov f6aadec7e2 Minor, rename tests onFile -> onFileObsolete 2015-05-20 09:24:56 +03:00
Denis Zharkov 083966389a Minor, get rid of repeating parsing semantics 2015-05-20 09:24:55 +03:00
Denis Zharkov 1df08cfa6c Minor, drop redundant allowAtAnnotations option
As '@' annotations are allowed everywhere
2015-05-20 09:24:55 +03:00
Denis Zharkov 488464dd3b Minor, extract methods 2015-05-20 09:24:55 +03:00
Denis Zharkov aa4a20dddc Add missing 'constructor' to testData when it was necessary 2015-05-20 09:24:55 +03:00
Denis Zharkov a9c1c3edb6 Add quickfix for missing 'constructor' inside primary ctor 2015-05-20 09:24:55 +03:00
Denis Zharkov a2578d0f46 Minor, move quickfixUtil.kt 2015-05-20 09:24:55 +03:00
Denis Zharkov 46a6cab671 Formatter: no spaces after 'constructor' inside primary ctor 2015-05-20 09:24:55 +03:00
Denis Zharkov 09cae59f0a Report warning on modifier list of primary ctor unless 'constructor' keyword specified 2015-05-20 09:24:54 +03:00
Denis Zharkov 805a811d91 Change parsing rules for primary constructor
- Parse 'constructor' keyword before value arguments
- Allow unescaped annotations
2015-05-20 09:24:54 +03:00
Denis Zharkov d058a07ce2 Parsing: allow semicolon between declarations 2015-05-20 09:24:54 +03:00
Valentin Kipyatkov 7edff172a2 KT-1273 Unused assignment - should highlight assignment instead of expression
#KT-1273 Fixed
2015-05-19 23:45:59 +03:00
Alexander Udalov 189286efee Support platformStatic members in companion object of enums
#KT-7777 Fixed
2015-05-19 18:47:00 +03:00
Alexander Udalov e1b367bd65 Delete test case for navigation to 'invoke' of functional type
Classes for functional types will not have any physical source representation
anymore, so navigation to them in the IDE will not be possible
2015-05-19 18:47:00 +03:00
Alexander Udalov bc2398cf40 JS: disable test on inheritance from function types
This is not yet fully supported but this test is an obstacle for the function
type refactoring

 #KT-7692 Open
2015-05-19 18:46:59 +03:00
Alexander Udalov 7a1b3bfbed JS: serialize/deserialize type annotations similarly to JVM
No new tests added because there are some on extension functions, which soon
will depend on type annotations to be preserved to work correctly
2015-05-19 18:46:58 +03:00