File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2645,7 +2645,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2645
2645
if (!nomDecl->isMoveOnly ())
2646
2646
return ;
2647
2647
2648
- for (auto *prot : nomDecl->getAllProtocols ()) {
2648
+ for (auto *prot : nomDecl->getLocalProtocols ()) {
2649
2649
nomDecl->diagnose (diag::moveonly_cannot_conform_to_protocol_with_name,
2650
2650
nomDecl->getDescriptiveKind (),
2651
2651
nomDecl->getBaseName (), prot->getBaseName ());
Original file line number Diff line number Diff line change @@ -135,11 +135,11 @@ struct UnsafePointerWithOwner<T> {
135
135
// Make sure we error whenever we attempt to conform a move only type to a
136
136
// protocol.
137
137
protocol P { }
138
- @_moveOnly class ProtocolCheckMoveOnlyKlass { } // expected-error {{move-only class 'ProtocolCheckMoveOnlyKlass' cannot conform to protocol 'P'}}
139
- @_moveOnly struct ProtocolCheckMoveOnlyStruct { // expected-error {{move-only struct 'ProtocolCheckMoveOnlyStruct' cannot conform to protocol 'P'}}
138
+ @_moveOnly class ProtocolCheckMoveOnlyKlass { }
139
+ @_moveOnly struct ProtocolCheckMoveOnlyStruct {
140
140
var k : MoveOnlyKlass
141
141
}
142
- @_moveOnly enum ProtocolCheckMoveOnlyEnum { } // expected-error {{move-only enum 'ProtocolCheckMoveOnlyEnum' cannot conform to protocol 'P'}}
142
+ @_moveOnly enum ProtocolCheckMoveOnlyEnum { }
143
143
144
144
extension ProtocolCheckMoveOnlyKlass : P { } // expected-error {{move-only class 'ProtocolCheckMoveOnlyKlass' cannot conform yet to any protocols}}
145
145
extension ProtocolCheckMoveOnlyStruct : P { } // expected-error {{move-only struct 'ProtocolCheckMoveOnlyStruct' cannot conform yet to any protocols}}
You can’t perform that action at this time.
0 commit comments