Skip to content

Commit f53d1b8

Browse files
committed
Merge: temporarily add initializers for nonescapable unit tests
This is needed until initializer inference is merged. Then these extra initializers can simply be deleted.
1 parent 967e554 commit f53d1b8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/SIL/type_lowering_unit.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ extension GSNC: Copyable where T: Copyable {}
120120

121121
struct GSNE<T: ~Escapable>: ~Escapable {
122122
var x: T
123+
124+
// 60_MERGE: an explicit initializer is temporarily required until initializer inferrence is merged.
125+
init(x: consuming T) { self.x = x }
123126
}
124127

125128
extension GSNE: Escapable where T: Escapable {}

test/SILGen/typelowering_inverses.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ func check(_ t: inout any NoEscapeP & ~Escapable) {}
139139
// MARK: conditionally Copyable & Escapable SILGen
140140

141141
struct MyStruct<T: ~Copyable & ~Escapable>: ~Copyable & ~Escapable {
142-
var x: T
142+
var x: T
143+
144+
// 60_MERGE: an explicit initializer is temporarily required until initializer inferrence is merged.
145+
init(x: consuming T) { self.x = x }
143146
}
144147

145148
extension MyStruct: Copyable where T: Copyable & ~Escapable {}

0 commit comments

Comments
 (0)