Skip to content

Commit c65016d

Browse files
committed
Unit test the LifetimeDependence feature diagnostic.
1 parent 6cc1a8d commit c65016d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Sema/lifetime_depend_nofeature.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ extension MutableSpan {
4545
mutating func mutatingNEInout(span: inout RawSpan) {} // expected-error{{a mutating method cannot have a ~Escapable 'self'}}
4646
// expected-error@-1{{a mutating method cannot have a ~Escapable 'inout' parameter 'span'}}
4747
}
48+
49+
extension Span {
50+
mutating func mutate() {} // expected-error{{a mutating method cannot have a ~Escapable 'self'}}
51+
}

0 commit comments

Comments
 (0)