We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd25c00 + a6f1990 commit 4a29db5Copy full SHA for 4a29db5
test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope_fixup.swift
@@ -32,7 +32,9 @@ struct View : ~Escapable {
32
self.ptr = k.ptr
33
self.c = k.c
34
}
35
- init(_ k: consuming View) {
+ // This overload requires a separate label because overloading
36
+ // on borrowing/consuming attributes is not allowed
37
+ init(consumingView k: consuming View) {
38
39
40
@@ -65,7 +67,7 @@ func consume(_ o : consuming MutableView) {}
65
67
66
68
@lifetime(x)
69
func getConsumingView(_ x: consuming View) -> View {
- return View(x)
70
+ return View(consumingView: x)
71
72
73
@lifetime(borrow x)
0 commit comments