File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -831,10 +831,11 @@ namespace {
831
831
return true ;
832
832
}
833
833
834
- // If the declaration is dynamically dispatched through a protocol,
835
- // we have to use materializeForSet.
836
- if (isa<ProtocolDecl>(decl->getDeclContext ()))
837
- return true ;
834
+ // If the declaration is dynamically dispatched through a
835
+ // non-ObjC protocol, we have to use materializeForSet.
836
+ if (auto *protoDecl = dyn_cast<ProtocolDecl>(decl->getDeclContext ()))
837
+ if (!protoDecl->isObjC ())
838
+ return true ;
838
839
839
840
return false ;
840
841
}
Original file line number Diff line number Diff line change @@ -280,3 +280,12 @@ extension InitializableConformerByExtension: Initializable {
280
280
}
281
281
}
282
282
// CHECK-LABEL: sil hidden [thunk] @_TToFC14objc_protocols33InitializableConformerByExtensionc
283
+
284
+ // Make sure we're crashing from trying to use materializeForSet here.
285
+ @objc protocol SelectionItem {
286
+ var time : Double { get set }
287
+ }
288
+
289
+ func incrementTime( contents: SelectionItem ) {
290
+ contents. time += 1.0
291
+ }
You can’t perform that action at this time.
0 commit comments