Commit Graph

67 Commits

Author SHA1 Message Date
Yan Zhulanow 4ae01badff Extract function: avoid same parameter names 2019-02-25 14:43:55 +03:00
Yan Zhulanow e958a9771f Extract refactoring: Make an extracted function 'inline' if any of its type parameters are reified (#KT-23983) 2018-07-12 20:36:38 +03:00
Alexey Sedunov 16dbc6fb4d Extract Function: Forbid inappropriate declarations inside extractable fragment
#KT-20467 Fixed
 #KT-20469 Fixed
2018-06-19 12:22:40 +03:00
Alexey Sedunov 2104a0fa2b Extract Function: Drop extra space in modifier list
#KT-23274 Fixed
2018-03-30 12:37:30 +03:00
Alexey Sedunov 5f43bd56b4 Extract Function: Use 'public' visibility for function extracted from public inline
#KT-15228 Fixed
2018-03-06 15:15:41 +03:00
Mikhail Glukhikh a960fa78cb Use expression body: add new line more accurately 2017-07-07 18:15:36 +03:00
Mikhail Glukhikh 523cbc6723 Convert to expression body: insert new-line after = for long lines 2017-07-07 18:15:07 +03:00
Dmitry Petrov c83b764c73 Update testData after changes in diagnostics 2017-05-26 13:58:46 +03:00
Alexey Sedunov add16dec3d Extract Function: Fix detection of suspend calls containing extracted parameters
#KT-16251 Fixed
2017-02-13 14:53:17 +03:00
Alexey Sedunov 7382d7c7d6 Extract Function: Add 'suspend' modifier if extracted function contains suspend-calls
#KT-14704 Fixed
2017-01-25 14:24:49 +03:00
Alexey Sedunov 25cebbab4b Extraction Engine: Do not wrap companion member references inside of the with call if it's disabled in extraction options
#KT-13781 Fixed
2016-12-02 14:14:04 +03:00
Alexander Udalov 035d6156a7 Drop Cloneable in JS, synthesize it at compile-time on JVM
Use the same approach that is used for creating function type classes
(Function{0,1,...}) + add Cloneable to supertypes of Array and primitive arrays

 #KT-5537 Fixed
2016-10-25 15:42:33 +03:00
Alexey Sedunov b793252a5f Extract Function: Skip callable reference selectors
#KT-13218 Fixed
2016-08-10 11:45:38 +03:00
Alexey Sedunov 59a714ca5c Presentation: Render function signature in RefactoringDescriptionLocation
#KT-12943 Fixed
2016-08-10 11:45:29 +03:00
Alexey Sedunov b5828a5fa1 Refactoring: Allow multiple ElementKinds when choosing element to refactor 2016-07-25 12:44:26 +03:00
Stanislav Erokhin 03241419bd Minor. removed several tests with error calls. 2016-06-10 21:28:04 +03:00
Stanislav Erokhin 4b9aac6318 Replace not debug usages of DescriptorRenderer.DEBUG_TEXT to DescriptorRenderer.FQ_NAMES_IN_TYPES. 2016-05-25 16:31:34 +03:00
Valentin Kipyatkov 4cd7193047 KT-11018 Ctrl + Mouse Hover shows a var as val
#KT-11018 Fixed
2016-02-13 10:20:20 +03:00
Denis Zharkov c1f57b743b Do not build enhanced descriptors if they are unchanged 2016-02-08 16:40:47 +03:00
Ilya Gorbunov 25c4453dc5 Cleanup deprecated symbol usages in testData 2016-01-22 05:54:38 +03:00
Ilya Gorbunov f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Denis Zharkov e2c02f825f Refine member scope for types with projections
Instead of erasing descriptors with conflicting substitution,
use invariant CapturedType(<projection>) as replacement for type parameter
within default member scope.

After substitution leave such types 'as is' everywhere except return types,
use common approximation for them.

 #KT-9294 In Progress
 #KT-5411 Fixed
 #KT-8647 Fixed

 #KT-9462 Fixed
 #KT-9893 Fixed
 #KT-7581 Fixed
 #KT-7296 In Progress
2015-12-28 11:13:37 +03:00
Alexander Udalov 239502368a Update test data for tower resolution algorithm
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +03:00
Alexey Sedunov 03e1480476 Extraction Engine: Get rid of explicit element offset manipulation and use copyable user data instead 2015-12-02 13:54:02 +03:00
Mikhail Glukhikh 41ebfd025e More precise diagnostics of smart cast impossible #KT-7240 Fixed 2015-11-03 13:38:51 +03:00
Alexey Sedunov 3fd6864461 Extraction Engine: When extracting to enum class body, place new declaration after the last entry
#KT-9629 Fixed
2015-10-24 19:50:52 +03:00
Pavel V. Talanov 41c0895abb JetExtractionTest: adjust test data
after making some of builtin types serializable
2015-10-01 17:53:17 +03:00
Valentin Kipyatkov 367b32c309 Adapted IDE to no explicit return type required for public declarations 2015-09-18 15:44:19 +03:00
Alexey Sedunov 0fbcf0b958 Extraction Engine: Report conflict on all diagnostics from UNRESOLVED_REFERENCE group
#KT-9117 Fixed
2015-09-17 01:33:23 +03:00
Michael Nedzelsky daa1ac1918 fix tests in org.jetbrains.kotlin.idea.refactoring.introduce 2015-09-08 02:05:46 +03:00
Alexey Sedunov e4dd30599e Extraction Engine: Forbid extraction of non-singleton qualifiers
#KT-8297 Fixed
2015-09-03 22:06:20 +03:00
Alexey Sedunov 1db7195e94 Extract Function: Fix callee replacement in operation expressions
#KT-8294 Fixed
2015-09-03 22:06:18 +03:00
Denis Zharkov befe025d21 Fix intentions testData: types rendering changed
Some more FQ names appeared.
The reason is that earlier such types were Lazy and their `toString` method return short version.
But after type enhancement they are represented with JetTypeImpl
2015-07-09 16:36:45 +03:00
Alexey Sedunov 1469275a5a Extract Function: Fix return type computation for extracted callee expression
#KT-8233 Fixed
2015-06-27 13:58:09 +03:00
Alexey Sedunov febf725e85 Extract Function: Extract block contents
#KT-8235 Fixed
2015-06-27 13:58:07 +03:00
Alexey Sedunov 608ce59f15 Resolution: Resolve primary constructor references to primary constructor
itself if it's explicitly present in PSI
2015-06-11 13:52:47 +03:00
Alexey Sedunov 9e69b74a15 Extract Function: Extract smart-cast value as parameter
#KT-7576 Fixed
2015-05-27 18:41:42 +03:00
Alexey Sedunov 58ef7f2691 Extraction Engine: Suggest both bounds for nullability-flexible types without nullability annotations. Do not omit return type if inferred one is flexible
#KT-6837 Fixed
2015-05-26 22:42:46 +03:00
Alexey Sedunov 5166cdbc96 Introduce...: Allow semicolon extraction
#KT-7583 Fixed
2015-05-21 19:29:46 +03:00
Dmitry Jemerov 625096466e IDE testdata: s/trait/interface 2015-05-13 16:13:13 +02:00
Alexey Sedunov 339383b5b1 Extract Function: Add test for ===
#KT-7663 Fixed
2015-05-11 20:57:59 +03:00
Alexey Sedunov 93f00db871 Extraction Engine: Consider declarations when comparing descriptors
#KT-6960 Fixed
2015-03-24 16:41:05 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Alexey Sedunov 9cb42944d1 Extraction Engine: Generate function/property accessor with expression body (whenever applicable)
#KT-6405 Fixed
2015-03-13 23:16:57 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Alexey Sedunov 5517c6c539 Extraction Engine: Report invisible types in the generated declaration header
#KT-6734 Fixed
2015-03-06 14:37:25 +03:00
Alexey Sedunov 1202e624ce Extraction Engine: Assume internal visibility for trait members 2015-03-06 14:37:20 +03:00
Pavel V. Talanov 989f07962b Write to trace in case class qualifier is a short reference to default object
This allows to fix some cases when there is a difference between explicit and short reference to default object
Fix shorten reference, optimize imports and import insert helper for default objects
ShortenReferences always transforms default object references to shorter form for now
Fix DescriptorUtils#getFqName() for default objects (affects test data mostly)
Fix DescriptorUtils#getImportableDescriptor()
2015-03-03 13:04:30 +03:00
Alexey Sedunov 9f3ba50dc5 Extract function: Do not report conflicts for fake overrides/delegates of the same callable declaration 2015-02-11 14:45:12 +03:00
Andrey Breslav da238cffaf Visibility of local classes is LOCAL 2015-01-29 16:07:29 +03:00