File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ struct BufferView : ~Escapable {
56
56
consuming func consume( ) -> dependsOn( scoped self) BufferView { // expected-error{{invalid use of scoped lifetime dependence with consuming ownership}}
57
57
return BufferView ( self . ptr)
58
58
}
59
+
60
+ func get( ) -> dependsOn( self ) Self { // expected-note{{'get()' previously declared here}}
61
+ return self
62
+ }
63
+
64
+ func get( ) -> dependsOn( scoped self) Self { // expected-error{{invalid redeclaration of 'get()'}}
65
+ return self
66
+ }
59
67
}
60
68
61
69
struct MutableBufferView : ~ Escapable, ~ Copyable {
@@ -202,3 +210,11 @@ public struct GenericBufferView<Element> : ~Escapable {
202
210
self . count = count
203
211
}
204
212
}
213
+
214
+ func derive( _ x: BufferView ) -> dependsOn( x ) BufferView { // expected-note{{'derive' previously declared here}}
215
+ return BufferView ( x. ptr)
216
+ }
217
+
218
+ func derive( _ x: BufferView ) -> dependsOn ( scoped x) BufferView { // expected-error{{invalid redeclaration of 'derive'}}
219
+ return BufferView ( x. ptr)
220
+ }
You can’t perform that action at this time.
0 commit comments