File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ func returnsExistentialP() -> any P {
8787 // expected-note@-1{{@unsafe conformance of 'Int' to protocol 'P' involves unsafe code}}
8888}
8989
90- struct UnsafeAsSequence : @unsafe Sequence , IteratorProtocol {
90+ // FIXME: Should work even if the IteratorProtocol conformance is safe
91+ struct UnsafeAsSequence : @unsafe Sequence , @unsafe IteratorProtocol {
9192 mutating func next( ) -> Int ? { nil }
9293}
9394
@@ -96,6 +97,7 @@ func testUnsafeAsSequenceForEach() {
9697
9798 // expected-warning@+1{{expression uses unsafe constructs but is not marked with 'unsafe'}}{{12-12=unsafe }}
9899 for _ in uas { } // expected-note{{conformance}}
100+ // expected-note@-1{{reference}}
99101
100102 for _ in unsafe uas { } // okay
101103}
You can’t perform that action at this time.
0 commit comments