File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
branches/master-rebranch/lib/Sema Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
1455
1455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
1456
1456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
1457
1457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458
- refs/heads/master-rebranch: 016e3dc4a6f4cf3032fd1357c3e7f770835d5ec0
1458
+ refs/heads/master-rebranch: faf6ba0823448d8871915afdc7917ae999b7079d
1459
1459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
1460
1460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
1461
1461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec
Original file line number Diff line number Diff line change @@ -3943,16 +3943,12 @@ bool MissingContextualConformanceFailure::diagnoseAsError() {
3943
3943
3944
3944
Optional<Diag<Type, Type>> diagnostic;
3945
3945
if (path.empty ()) {
3946
- if (getParentExpr () && isa<CallExpr>(getParentExpr ())) {
3947
- diagnostic = getDiagnosticFor (CTP_CallArgument, /* forProtocol=*/ true );
3946
+ assert (isa<AssignExpr>(anchor));
3947
+ if (isa<SubscriptExpr>(cast<AssignExpr>(anchor)->getDest ())) {
3948
+ diagnostic =
3949
+ getDiagnosticFor (CTP_SubscriptAssignSource, /* forProtocol=*/ true );
3948
3950
} else {
3949
- assert (isa<AssignExpr>(anchor));
3950
- if (isa<SubscriptExpr>(cast<AssignExpr>(anchor)->getDest ())) {
3951
- diagnostic =
3952
- getDiagnosticFor (CTP_SubscriptAssignSource, /* forProtocol=*/ true );
3953
- } else {
3954
- diagnostic = getDiagnosticFor (CTP_AssignSource, /* forProtocol=*/ true );
3955
- }
3951
+ diagnostic = getDiagnosticFor (CTP_AssignSource, /* forProtocol=*/ true );
3956
3952
}
3957
3953
} else {
3958
3954
const auto &last = path.back ();
You can’t perform that action at this time.
0 commit comments