Skip to content

Commit a0360a1

Browse files
committed
Unit test the LifetimeDependence feature diagnostic.
1 parent 50a69bc commit a0360a1

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
@@ -24,3 +24,7 @@ class C {
2424

2525
func neInout(span: inout RawSpan) {} // expected-error{{a method cannot have a ~Escapable 'inout' parameter 'span'}}
2626
}
27+
28+
extension Span {
29+
mutating func mutate() {} // expected-error{{a mutating method cannot have a ~Escapable 'self'}}
30+
}

0 commit comments

Comments
 (0)