Ben Barham
d2de8ed83c
[SourceKit] Merge local refactoring implementations
...
Retrieving local rename ranges and the local rename refactoring both had
almost identical methods, except for the addition of retrieving the
outermost shadowed decl that was added a couple months back. Merge them.
Resolves rdar://106529370.
2023-03-13 15:36:47 -07:00
Anthony Latsis
fa3a95e7b8
Gardening: Migrate test suite to GH issues: refactoring
2022-09-02 01:44:24 +03:00
Josh Soref
6fd6b13c56
spelling: unwrapped
...
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-21 15:53:30 -04:00
Josh Soref
edf494fa1f
spelling: extract
...
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-21 15:53:30 -04:00
Suyash Srijan
b1b60fbbda
[Refactoring] Create 'AddEquatableContext' with extension only when there is an extended nominal declaration ( #32435 )
2020-06-17 21:33:22 +01:00
Andrew Tkachuk
d0ac023dbc
Apply requested changes
2020-04-25 21:13:14 +03:00
Andrew Tkachuk
ad15f21cde
[SR-7293] Refactoring action to add Equatable Conformance
2020-02-14 19:31:58 +02:00
Vlasov Anton
904bd0bf63
SR-5740 Refactoring action to convert if statement to switch
2020-02-02 12:44:48 +03:00
Vlasov Anton
b52a0929c4
SR-5741 Refactoring action to convert from field initialization to computed property
2019-12-08 21:17:39 +03:00
Robert Widmann
c75af38a7a
Drop ConformanceContexts out of the TypeChecker
2019-11-06 11:41:03 -08:00
Власов Антон Вячеславович
8acd794935
SR-5744 Refactoring action to convert if-let to guard-let and vice versa
2019-07-09 16:21:25 +03:00
Parker Schuh
d0779bd771
Convert ArrayExpr to not use callWitness() or generate a SemanticExpr.
2019-03-27 23:21:08 -04:00
Parker Schuh
b12fcb50db
IntegerLiteralExpr now is lowered directly into SIL.
...
For context, String, Nil, and Bool already behave this way.
Note: Before it used to construct (call, ... (integer_literal)), and the
call would be made explicit / implicit based on if you did eg: Int(3) or
just 3. This however did not translate to the new world so this PR adds
a IsExplicitConversion bit to NumberLiteralExpr. Some side results of
all this are that some warnings changed a little and some instructions are
emitted in a different order.
2019-02-14 11:54:16 -08:00
Xi Ge
bff3f8adcc
Merge pull request #16983 from mohitathwani/SR-7292
...
[WIP] Generating member wise initializer with local refactoring
2018-07-26 13:05:08 -07:00
Mohit Athwani
ce1122921a
SR-7292 - Refactoring tool for generating member wise init
2018-07-26 11:31:30 -07:00
Rintaro Ishizaki
711cef6869
[Refactoring] Fix crasher in switch with non-nominal subject type
...
rdar://problem/42098130
2018-07-24 18:07:07 +09:00
Rintaro Ishizaki
025f4dde55
Merge pull request #16789 from rintaro/refactoring-nested-if
...
[Refactoring] Re-implement "collapse nested if" action
2018-05-24 07:56:02 +09:00
Rintaro Ishizaki
70ff0c013b
[Refactoring] Disallow extracting partial statement
...
`BraceStmt`, `CatchStmt` and `CaseStmt` cannot be independent
statement, thus unextractable.
rdar://problem/38390401
2018-05-23 18:03:27 +09:00
Rintaro Ishizaki
639fb85c5f
[Refactoring] Rename CollapseNestedIfExpr to CollapseNestedIfStmt
...
'if' is not expression, but statement.
2018-05-23 17:13:35 +09:00
Rintaro Ishizaki
f1c8230b2a
[Refactoring] Re-implement "collapse nested if" action
...
Narrowed `isApplicable()` condition to ensure that we don't emit this
action when it's not safe to apply this action.
Fixes rdar://problem/39516354
2018-05-23 17:13:35 +09:00
Rintaro Ishizaki
b984789ee5
[AST] Initialize Target of break/continue with nullptr
...
Otherwise, it's never initialized. This doesn't affect normal compilation
because it doensn't reach only-user SILGen due to typecheck error. However,
IDE refactoring uses this regardless of the error.
rdar://problem/33972653
2018-04-20 15:25:09 +09:00
Rintaro Ishizaki
53be298f1f
[IDE] Don't emit “Convert to Trailing Closure” for trailing closure ( #15824 )
...
rdar://problem/39253640
2018-04-09 15:30:52 +09:00
Xi Ge
2f47af6c7c
refactoring: don't assume every pattern binding has an initializer. rdar://38062772
2018-03-05 16:14:09 -08:00
Xi Ge
cf36346021
refactoring: when RangeInfo is of kind PartOfExpression, we should use the dedicated field to get the parent expression. rdar://36755861 ( #14088 )
2018-01-23 12:53:50 -08:00
Roman Roibu
b2d122c4a7
[IDE] Refactoring: Expand a ternary operator into an if statement and vice-versa ( #12554 )
2017-12-21 12:40:30 -08:00
Rintaro Ishizaki
a57199cf68
[refactoring] Implement "Convert to Trailing Closure" refactoring action
2017-10-16 00:42:05 -07:00
Kacper Harasim
8cd677eb1f
[Refactoring] SR-6051 Expansion of switch statement missing cases ( #12281 )
2017-10-13 09:37:58 -07:00
Kacper Harasim
6fcb8308ff
[IDE] Refactoring: conversion from “force try” to error handled version ( #12063 )
...
* [IDE] Refactoring: conversion from “force try” do error handled version
* Removed unnecessary empty line
* Changed name of the refactor
* Review fixes
* Fixed recognizing try_! location by CursorResolver
* Review fixes
2017-09-24 09:05:32 -04:00
Kacper Harasim
80698a04b0
[IDE] SR-5745 Refactoring: converting strings concatenation expression to strings interpolation ( #11944 )
2017-09-19 13:37:42 -07:00
Will T. Ellis
57454eb8c9
SR-5739 Add refactoring action to collapse nested if ( #11851 )
2017-09-18 16:16:01 -07:00
Xi Ge
53585a5e70
Refactoring: Implement a refactoring action to simplify long number literal format. SR-5746
...
For instance, converting from "100000" to "100_000", and "1000.0001" to
"1_000.000_1".
2017-08-31 14:25:48 -07:00
Argyrios Kyrtzidis
60a91bb736
[refactoring] Upstreaming the implementation for Swift local refactoring ( #11568 )
...
[refactoring] Upstreaming the implementation for Swift local refactoring
2017-08-22 16:50:16 -07:00