File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -4337,7 +4337,7 @@ bool ThrowingFunctionConversionFailure::diagnoseAsError() {
4337
4337
4338
4338
bool UnecessaryCoecionFailure::diagnoseAsError () {
4339
4339
auto expr = dyn_cast<CoerceExpr>(getAnchor ());
4340
-
4340
+
4341
4341
emitDiagnostic (expr->getLoc (), diag::unecessary_same_type_coercion, getToType ())
4342
4342
.fixItRemove (SourceRange (expr->getLoc (),
4343
4343
expr->getCastTypeLoc ().getSourceRange ().End ));
Original file line number Diff line number Diff line change @@ -138,17 +138,15 @@ _ = sr6022_1 as? Any // expected-warning {{conditional cast from '() -> ()' to '
138
138
139
139
// SR-11295
140
140
let sr11295a = " Hello "
141
- _ = sr11295a as String // expected-warning {{casting expression to 'String' doesn't change the type}} {{7-17 =}}
141
+ _ = sr11295a as String // expected-warning {{casting expression to 'String' doesn't change the type}} {{14-24 =}}
142
142
143
143
let sr11295b = 1
144
- _ = sr11295b as Int // expected-warning {{casting expression to 'Int' doesn't change the type}} {{7-14 =}}
144
+ _ = sr11295b as Int // expected-warning {{casting expression to 'Int' doesn't change the type}} {{14-21 =}}
145
145
146
146
typealias Type = String
147
147
148
148
let sr11295c : Type = " Hello Typealias "
149
- _ = sr11295c as String // expected-warning {{casting expression to 'String' doesn't change the type}} {{7-17 =}}
149
+ _ = sr11295c as String // expected-warning {{casting expression to 'String' doesn't change the type}} {{14-24 =}}
150
150
151
151
let sr11295d = " Hello Typealias "
152
- _ = sr11295d as Type // expected-warning {{casting expression to 'Type' (aka 'String') doesn't change the type}} {{7-15=}}
153
-
154
- _ = " Hello " as String // expected-warning {{casting expression to 'String' doesn't change the type}} {{13-23=}}
152
+ _ = sr11295d as Type // expected-warning {{casting expression to 'Type' (aka 'String') doesn't change the type}} {{14-22=}}
You can’t perform that action at this time.
0 commit comments