Skip to content

Commit 30fe52e

Browse files
committed
[move-only] Update tests for drop_deinit lowering.
(cherry picked from commit 14f5917)
1 parent a41d014 commit 30fe52e

File tree

4 files changed

+83
-102
lines changed

4 files changed

+83
-102
lines changed

test/SILGen/discard.swift

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,16 @@ func invokedDeinit() {}
2525
// CHECK: [[SELF_MMC:%.*]] = mark_must_check [no_consume_or_assign] [[SELF_REF]] : $*MaybeFile
2626
// CHECK: [[SELF_VAL:%.*]] = load [copy] [[SELF_MMC]] : $*MaybeFile
2727
// CHECK: [[DD:%.*]] = drop_deinit [[SELF_VAL]] : $MaybeFile
28-
// CHECK: switch_enum [[DD]] : $MaybeFile, case #MaybeFile.some!enumelt: bb1, case #MaybeFile.none!enumelt: bb2
28+
// CHECK: destroy_value [[DD]] : $MaybeFile
29+
30+
// CHECK-SIL-LABEL: sil hidden @$s4test9MaybeFileOAASivg
31+
// CHECK-SIL: [[SELF_STACK:%.*]] = alloc_stack $MaybeFile, let, name "self", argno 1
32+
// CHECK-SIL: store {{.*}}
33+
// CHECK-SIL: [[SELF_VAL:%.*]] = load [[SELF_STACK]] : $*MaybeFile
34+
// CHECK-SIL: switch_enum [[SELF_VAL]] : $MaybeFile, case #MaybeFile.some!enumelt: bb1, case #MaybeFile.none!enumelt: bb2
2935
//
30-
// CHECK: bb1([[FILE:%.*]] : @owned $File):
31-
// CHECK: destroy_value [[FILE]] : $File
36+
// CHECK-SIL: bb1([[FILE:%.*]] : $File):
37+
// CHECK-SIL: release_value [[FILE]] : $File
3238
}
3339

3440
@_moveOnly struct File {
@@ -54,7 +60,7 @@ func invokedDeinit() {}
5460
// CHECK: [[SELF_MMC:%.*]] = mark_must_check [no_consume_or_assign] [[SELF_REF]] : $*File
5561
// CHECK: [[SELF_VAL:%.*]] = load [copy] [[SELF_MMC]] : $*File
5662
// CHECK: [[DD:%.*]] = drop_deinit [[SELF_VAL]] : $File
57-
// CHECK: end_lifetime [[DD]] : $File
63+
// CHECK: destroy_value [[DD]] : $File
5864

5965
deinit {
6066
invokedDeinit()
@@ -90,7 +96,7 @@ func invokedDeinit() {}
9096
// CHECK: [[COPIED_SELF:%.*]] = load [copy] [[MMC]] : $*PointerTree
9197
// CHECK: end_access [[ACCESS]] : $*PointerTree
9298
// CHECK: [[DD:%.*]] = drop_deinit [[COPIED_SELF]]
93-
// CHECK: end_lifetime [[DD]]
99+
// CHECK: destroy_value [[DD]]
94100
// CHECK: br bb3
95101
//
96102
// CHECK: bb2:
@@ -116,9 +122,7 @@ func invokedDeinit() {}
116122
// CHECK-SIL: br bb3
117123
//
118124
// CHECK-SIL: bb2:
119-
// CHECK-SIL: [[TREE_DEINIT:%.*]] = function_ref @$s4test11PointerTreeVfD : $@convention(method) (@owned PointerTree) -> ()
120-
// CHECK-SIL: [[SELF_VAL:%.*]] = load {{.*}} : $*PointerTree
121-
// CHECK-SIL: apply [[TREE_DEINIT]]([[SELF_VAL]]) : $@convention(method) (@owned PointerTree) -> ()
125+
// CHECK-SIL: destroy_addr %{{.*}} : $*PointerTree
122126
// CHECK-SIL: br bb3
123127
//
124128
// CHECK-SIL: bb3:
@@ -159,13 +163,24 @@ final class Wallet {
159163
// CHECK: [[SELF_COPY:%.*]] = load [copy] [[SELF_MMC]] : $*Ticket
160164
// CHECK: end_access [[SELF_ACCESS:%.*]] : $*Ticket
161165
// CHECK: [[DD:%.*]] = drop_deinit [[SELF_COPY]] : $Ticket
162-
// CHECK: switch_enum [[DD]] : $Ticket, case #Ticket.empty!enumelt: [[TICKET_EMPTY:bb[0-9]+]], case #Ticket.within!enumelt: [[TICKET_WITHIN:bb[0-9]+]]
163-
// CHECK: [[TICKET_EMPTY]]:
164-
// CHECK: br [[JOIN_POINT:bb[0-9]+]]
165-
// CHECK: [[TICKET_WITHIN]]([[PREV_SELF_WALLET:%.*]] : @owned $Wallet):
166-
// CHECK: destroy_value [[PREV_SELF_WALLET]] : $Wallet
167-
// CHECK: br [[JOIN_POINT]]
168-
// CHECK: [[JOIN_POINT]]:
166+
// CHECK: destroy_value [[DD]] : $Ticket
167+
168+
// CHECK-SIL-LABEL: sil hidden @$s4test6TicketO06changeB08inWalletyAA0E0CSg_tF : $@convention(method) (@guaranteed Optional<Wallet>, @owned Ticket) -> () {
169+
// CHECK-SIL: [[SELF_REF:%.*]] = alloc_stack [lexical] $Ticket, var, name "self", implicit
170+
// CHECK-SIL: switch_enum {{.*}} : $Optional<Wallet>, case #Optional.some!enumelt: {{.*}}, case #Optional.none!enumelt: [[NO_WALLET_BB:bb[0-9]+]]
171+
//
172+
// >> now we begin the destruction sequence, which involves pattern matching on self to destroy its innards
173+
// CHECK-SIL: [[NO_WALLET_BB]]
174+
// CHECK-SIL: [[SELF_ACCESS:%.*]] = begin_access [modify] [static] {{%.*}} : $*Ticket
175+
// CHECK-SIL: [[SELF_COPY:%.*]] = load [[SELF_ACCESS]] : $*Ticket
176+
// CHECK-SIL: end_access [[SELF_ACCESS:%.*]] : $*Ticket
177+
// CHECK-SIL: switch_enum [[SELF_COPY]] : $Ticket, case #Ticket.empty!enumelt: [[TICKET_EMPTY:bb[0-9]+]], case #Ticket.within!enumelt: [[TICKET_WITHIN:bb[0-9]+]]
178+
// CHECK-SIL: [[TICKET_EMPTY]]:
179+
// CHECK-SIL: br [[JOIN_POINT:bb[0-9]+]]
180+
// CHECK-SIL: [[TICKET_WITHIN]]([[PREV_SELF_WALLET:%.*]] : $Wallet):
181+
// CHECK-SIL: strong_release [[PREV_SELF_WALLET]] : $Wallet
182+
// CHECK-SIL: br [[JOIN_POINT]]
183+
// CHECK-SIL: [[JOIN_POINT]]:
169184

170185
deinit {
171186
print("destroying ticket")

test/SILGen/moveonly_deinits.swift

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,14 @@ var value: Bool { false }
6666
// SILGEN: bb0([[ARG:%.*]] :
6767
// SILGEN: [[MARK:%.*]] = mark_must_check [consumable_and_assignable] [[ARG]]
6868
// SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
69-
// SILGEN: ([[LHS:%.*]], [[RHS:%.*]]) = destructure_struct [[DD]]
70-
// SILGEN: destroy_value [[LHS]]
71-
// SILGEN: destroy_value [[RHS]]
69+
// SILGEN: destroy_value [[DD]]
7270
// SILGEN: } // end sil function '$s16moveonly_deinits19KlassPairWithDeinitVfD'
7371

7472
// SILGEN-LABEL: sil hidden [ossa] @$s16moveonly_deinits17IntPairWithDeinitVfD : $@convention(method) (@owned IntPairWithDeinit) -> () {
7573
// SILGEN: bb0([[ARG:%.*]] :
7674
// SILGEN: [[MARKED:%.*]] = mark_must_check [consumable_and_assignable] [[ARG]]
7775
// SILGEN: [[DD:%.*]] = drop_deinit [[MARKED]]
78-
// SILGEN: end_lifetime [[DD]]
76+
// SILGEN: destroy_value [[DD]]
7977
// SILGEN: } // end sil function '$s16moveonly_deinits17IntPairWithDeinitVfD'
8078

8179
////////////////////////
@@ -165,11 +163,7 @@ public func testIntPairWithoutDeinit() {
165163
// SIL: br bb3
166164
//
167165
// SIL: bb2:
168-
// SIL: [[DEINIT:%.*]] = function_ref @$s16moveonly_deinits17IntPairWithDeinitVfD : $@convention(method) (@owned IntPairWithDeinit) -> ()
169-
// SIL: [[VALUE:%.*]] = load [[STACK]]
170-
// SIL: apply [[DEINIT]]([[VALUE]]) : $@convention(method) (@owned IntPairWithDeinit) -> ()
171-
// SIL-NOT: apply
172-
// SIL-NOT: destroy_addr
166+
// SIL: destroy_addr [[STACK]] : $*IntPairWithDeinit
173167
// SIL: br bb3
174168
//
175169
// SIL: bb3:
@@ -266,11 +260,7 @@ public func testKlassPairWithoutDeinit() {
266260
// SIL: br bb3
267261
//
268262
// SIL: bb2:
269-
// SIL: [[DEINIT:%.*]] = function_ref @$s16moveonly_deinits19KlassPairWithDeinitVfD : $@convention(method) (@owned KlassPairWithDeinit) -> ()
270-
// SIL: [[VALUE:%.*]] = load [[STACK]]
271-
// SIL: apply [[DEINIT]]([[VALUE]]) : $@convention(method) (@owned KlassPairWithDeinit) -> ()
272-
// SIL-NOT: apply
273-
// SIL-NOT: destroy_addr
263+
// SIL: destroy_addr [[STACK]] : $*KlassPairWithDeinit
274264
// SIL: br bb3
275265
//
276266
// SIL: bb3:
@@ -332,17 +322,7 @@ func consumeKlassEnumPairWithDeinit(_ x: __owned KlassEnumPairWithDeinit) { }
332322
// SILGEN: bb0([[ARG:%.*]] :
333323
// SILGEN: [[MARK:%.*]] = mark_must_check [consumable_and_assignable] [[ARG]]
334324
// SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
335-
// SILGEN: switch_enum [[DD]] : $KlassEnumPairWithDeinit, case #KlassEnumPairWithDeinit.lhs!enumelt: [[BB_LHS:bb[0-9]+]], case #KlassEnumPairWithDeinit.rhs!enumelt: [[BB_RHS:bb[0-9]+]]
336-
//
337-
// SILGEN: [[BB_LHS]]([[ARG:%.*]] :
338-
// SILGEN-NEXT: destroy_value [[ARG]]
339-
// SILGEN-NEXT: br [[BB_CONT:bb[0-9]+]]
340-
//
341-
// SILGEN: [[BB_RHS]]([[ARG:%.*]] :
342-
// SILGEN-NEXT: destroy_value [[ARG]]
343-
// SILGEN-NEXT: br [[BB_CONT]]
344-
//
345-
// SILGEN: [[BB_CONT]]:
325+
// SILGEN: destroy_value [[DD]] : $KlassEnumPairWithDeinit
346326
// SILGEN-NEXT: tuple ()
347327
// SILGEN-NEXT: return
348328
// SILGEN: } // end sil function '$s16moveonly_deinits23KlassEnumPairWithDeinitOfD'
@@ -351,15 +331,7 @@ func consumeKlassEnumPairWithDeinit(_ x: __owned KlassEnumPairWithDeinit) { }
351331
// SILGEN: bb0([[ARG:%.*]] :
352332
// SILGEN: [[MARK:%.*]] = mark_must_check [consumable_and_assignable] [[ARG]]
353333
// SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
354-
// SILGEN: switch_enum [[DD]] : $IntEnumPairWithDeinit, case #IntEnumPairWithDeinit.lhs!enumelt: [[BB_LHS:bb[0-9]+]], case #IntEnumPairWithDeinit.rhs!enumelt: [[BB_RHS:bb[0-9]+]]
355-
//
356-
// SILGEN: [[BB_LHS]]([[ARG:%.*]] :
357-
// SILGEN-NEXT: br [[BB_CONT:bb[0-9]+]]
358-
//
359-
// SILGEN: [[BB_RHS]]([[ARG:%.*]] :
360-
// SILGEN-NEXT: br [[BB_CONT]]
361-
//
362-
// SILGEN: [[BB_CONT]]:
334+
// SILGEN: destroy_value [[DD]] : $IntEnumPairWithDeinit
363335
// SILGEN-NEXT: tuple ()
364336
// SILGEN-NEXT: return
365337
// SILGEN: } // end sil function '$s16moveonly_deinits21IntEnumPairWithDeinitOfD'
@@ -449,11 +421,7 @@ public func testIntEnumPairWithoutDeinit() {
449421
// SIL: br bb3
450422
//
451423
// SIL: bb2:
452-
// SIL: [[DEINIT:%.*]] = function_ref @$s16moveonly_deinits21IntEnumPairWithDeinitOfD : $@convention(method) (@owned IntEnumPairWithDeinit) -> ()
453-
// SIL: [[VALUE:%.*]] = load [[STACK]]
454-
// SIL: apply [[DEINIT]]([[VALUE]]) : $@convention(method) (@owned IntEnumPairWithDeinit) -> ()
455-
// SIL-NOT: apply
456-
// SIL-NOT: destroy_addr
424+
// SIL: destroy_addr [[STACK]] : $*IntEnumPairWithDeinit
457425
// SIL: br bb3
458426
//
459427
// SIL: bb3:
@@ -547,11 +515,7 @@ public func testKlassEnumPairWithoutDeinit() {
547515
// SIL: br bb3
548516
//
549517
// SIL: bb2:
550-
// SIL: [[DEINIT:%.*]] = function_ref @$s16moveonly_deinits23KlassEnumPairWithDeinitOfD : $@convention(method) (@owned KlassEnumPairWithDeinit) -> ()
551-
// SIL: [[VALUE:%.*]] = load [[STACK]]
552-
// SIL: apply [[DEINIT]]([[VALUE]]) : $@convention(method) (@owned KlassEnumPairWithDeinit) -> ()
553-
// SIL-NOT: apply
554-
// SIL-NOT: destroy_addr
518+
// SIL: destroy_addr [[STACK]] : $*KlassEnumPairWithDeinit
555519
// SIL: br bb3
556520
//
557521
// SIL: bb3:

test/SILOptimizer/moveonly_deinit_devirtualization.sil

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ struct TrivialStruct {
1818
var i: Builtin.Int32
1919
}
2020

21+
@_moveOnly
22+
struct StructDeinit {
23+
var i: Builtin.Int32
24+
25+
deinit
26+
}
27+
2128
@_moveOnly
2229
struct SingleFieldNonTrivial {
2330
var k: Klass
@@ -69,14 +76,14 @@ bb0(%0 : @owned $Klass):
6976
return %9999 : $()
7077
}
7178

72-
// CHECK-LABEL: sil [ossa] @trivialStructTest : $@convention(thin) (@owned TrivialStruct) -> () {
73-
// CHECK: bb0([[ARG:%.*]] : @owned $TrivialStruct):
74-
// CHECK: [[FUNC:%.*]] = function_ref @$s4main13TrivialStructVfD :
79+
// CHECK-LABEL: sil [ossa] @structDeinitTest : $@convention(thin) (@owned StructDeinit) -> () {
80+
// CHECK: bb0([[ARG:%.*]] : @owned $StructDeinit):
81+
// CHECK: [[FUNC:%.*]] = function_ref @$s4main12StructDeinitVfD :
7582
// CHECK: apply [[FUNC]]([[ARG]])
76-
// CHECK: } // end sil function 'trivialStructTest'
77-
sil [ossa] @trivialStructTest : $@convention(thin) (@owned TrivialStruct) -> () {
78-
bb0(%0 : @owned $TrivialStruct):
79-
destroy_value %0 : $TrivialStruct
83+
// CHECK: } // end sil function 'structDeinitTest'
84+
sil [ossa] @structDeinitTest : $@convention(thin) (@owned StructDeinit) -> () {
85+
bb0(%0 : @owned $StructDeinit):
86+
destroy_value %0 : $StructDeinit
8087
%9999 = tuple()
8188
return %9999 : $()
8289
}
@@ -125,15 +132,15 @@ bb0(%0 : @owned $NonTrivialMoveOnlyEnum):
125132
// Var Tests
126133
//===----------------------------------------------------------------------===//
127134

128-
// CHECK-LABEL: sil [ossa] @trivialStructAddrTest : $@convention(thin) (@in TrivialStruct) -> () {
129-
// CHECK: bb0([[ARG:%.*]] : $*TrivialStruct):
130-
// CHECK: [[FUNC:%.*]] = function_ref @$s4main13TrivialStructVfD :
135+
// CHECK-LABEL: sil [ossa] @trivialStructAddrTest : $@convention(thin) (@in StructDeinit) -> () {
136+
// CHECK: bb0([[ARG:%.*]] : $*StructDeinit):
137+
// CHECK: [[FUNC:%.*]] = function_ref @$s4main12StructDeinitVfD :
131138
// CHECK: [[LOADED_VALUE:%.*]] = load [take] [[ARG]]
132139
// CHECK: apply [[FUNC]]([[LOADED_VALUE]])
133140
// CHECK: } // end sil function 'trivialStructAddrTest'
134-
sil [ossa] @trivialStructAddrTest : $@convention(thin) (@in TrivialStruct) -> () {
135-
bb0(%0 : $*TrivialStruct):
136-
destroy_addr %0 : $*TrivialStruct
141+
sil [ossa] @trivialStructAddrTest : $@convention(thin) (@in StructDeinit) -> () {
142+
bb0(%0 : $*StructDeinit):
143+
destroy_addr %0 : $*StructDeinit
137144
%9999 = tuple()
138145
return %9999 : $()
139146
}
@@ -216,12 +223,13 @@ bb0(%0 : $*ThreeNonTrivialNoDeinit):
216223
// Destructors
217224
//===----------------------------------------------------------------------===//
218225

219-
sil hidden [ossa] @$s4main13TrivialStructVfD : $@convention(method) (@owned TrivialStruct) -> () {
220-
bb0(%0 : @owned $TrivialStruct):
221-
debug_value %0 : $TrivialStruct, let, name "self", argno 1, implicit
222-
%2 = destructure_struct %0 : $TrivialStruct
223-
%3 = tuple ()
224-
return %3 : $()
226+
sil hidden [ossa] @$s4main12StructDeinitVfD : $@convention(method) (@owned StructDeinit) -> () {
227+
bb0(%0 : @owned $StructDeinit):
228+
debug_value %0 : $StructDeinit, let, name "self", argno 1, implicit
229+
%2 = drop_deinit %0 : $StructDeinit
230+
%3 = destructure_struct %2 : $StructDeinit
231+
%4 = tuple ()
232+
return %4 : $()
225233
}
226234

227235
// CHECK-LABEL: sil hidden [ossa] @$s4main21SingleFieldNonTrivialVfD : $@convention(method) (@owned SingleFieldNonTrivial) -> () {
@@ -313,40 +321,40 @@ bb6:
313321
// drop_deinit Tests
314322
//===----------------------------------------------------------------------===//
315323

316-
// CHECK-LABEL: sil [ossa] @dropDeinitOnStruct : $@convention(thin) (@owned TrivialStruct) -> () {
324+
// CHECK-LABEL: sil [ossa] @dropDeinitOnStruct : $@convention(thin) (@owned StructDeinit) -> () {
317325
// CHECK: %1 = drop_deinit %0
318326
// CHECK-NEXT: destroy_value %1
319327
// CHECK: } // end sil function 'dropDeinitOnStruct'
320-
sil [ossa] @dropDeinitOnStruct : $@convention(thin) (@owned TrivialStruct) -> () {
321-
bb0(%0 : @owned $TrivialStruct):
322-
%1 = drop_deinit %0 : $TrivialStruct
323-
destroy_value %1 : $TrivialStruct
328+
sil [ossa] @dropDeinitOnStruct : $@convention(thin) (@owned StructDeinit) -> () {
329+
bb0(%0 : @owned $StructDeinit):
330+
%1 = drop_deinit %0 : $StructDeinit
331+
destroy_value %1 : $StructDeinit
324332
%9999 = tuple()
325333
return %9999 : $()
326334
}
327335

328-
// CHECK-LABEL: sil [ossa] @dropDeinitOnMovedStruct : $@convention(thin) (@owned TrivialStruct) -> () {
336+
// CHECK-LABEL: sil [ossa] @dropDeinitOnMovedStruct : $@convention(thin) (@owned StructDeinit) -> () {
329337
// CHECK: %1 = drop_deinit %0
330338
// CHECK-NEXT: %2 = move_value %1
331339
// CHECK-NEXT: destroy_value %2
332340
// CHECK: } // end sil function 'dropDeinitOnMovedStruct'
333-
sil [ossa] @dropDeinitOnMovedStruct : $@convention(thin) (@owned TrivialStruct) -> () {
334-
bb0(%0 : @owned $TrivialStruct):
335-
%1 = drop_deinit %0 : $TrivialStruct
336-
%2 = move_value %1 : $TrivialStruct
337-
destroy_value %2 : $TrivialStruct
341+
sil [ossa] @dropDeinitOnMovedStruct : $@convention(thin) (@owned StructDeinit) -> () {
342+
bb0(%0 : @owned $StructDeinit):
343+
%1 = drop_deinit %0 : $StructDeinit
344+
%2 = move_value %1 : $StructDeinit
345+
destroy_value %2 : $StructDeinit
338346
%9999 = tuple()
339347
return %9999 : $()
340348
}
341349

342-
// CHECK-LABEL: sil [ossa] @dropDeinitOnIndirectStruct : $@convention(thin) (@in TrivialStruct) -> () {
350+
// CHECK-LABEL: sil [ossa] @dropDeinitOnIndirectStruct : $@convention(thin) (@in StructDeinit) -> () {
343351
// CHECK: %1 = drop_deinit %0
344352
// CHECK-NEXT: destroy_addr %1
345353
// CHECK: } // end sil function 'dropDeinitOnIndirectStruct'
346-
sil [ossa] @dropDeinitOnIndirectStruct : $@convention(thin) (@in TrivialStruct) -> () {
347-
bb0(%0 : $*TrivialStruct):
348-
%1 = drop_deinit %0 : $*TrivialStruct
349-
destroy_addr %1 : $*TrivialStruct
354+
sil [ossa] @dropDeinitOnIndirectStruct : $@convention(thin) (@in StructDeinit) -> () {
355+
bb0(%0 : $*StructDeinit):
356+
%1 = drop_deinit %0 : $*StructDeinit
357+
destroy_addr %1 : $*StructDeinit
350358
%9999 = tuple()
351359
return %9999 : $()
352360
}
@@ -359,8 +367,8 @@ sil_moveonlydeinit Klass {
359367
@$s4main5KlassCfD
360368
}
361369

362-
sil_moveonlydeinit TrivialStruct {
363-
@$s4main13TrivialStructVfD // TrivialStruct.deinit
370+
sil_moveonlydeinit StructDeinit {
371+
@$s4main12StructDeinitVfD // StructDeinit.deinit
364372
}
365373

366374
sil_moveonlydeinit SingleFieldNonTrivial {

test/SILOptimizer/moveonly_deinits.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ struct MoveOnlyStruct {
1919
y = self
2020
// expected-note @-1 {{consumed here}}
2121
// expected-note @-2 {{consumed again here}}
22-
// We get an infinite recursion since we are going to call our own
23-
// deinit here. We are just testing diagnostics here though.
24-
// expected-warning @-6 {{function call causes an infinite recursion}}
2522
_ = y
2623
// expected-note @-1 {{consumed here}}
2724
let z = y // expected-note {{consumed again here}}
@@ -45,9 +42,6 @@ enum MoveOnlyEnum {
4542
var y = MoveOnlyEnum.lhs(Klass())
4643
y = self // expected-note {{consumed here}}
4744
// expected-note @-1 {{consumed again here}}
48-
// We get an infinite recursion since we are going to call our own
49-
// deinit here. We are just testing diagnostics here though.
50-
// expected-warning @-5 {{function call causes an infinite recursion}}
5145
_ = y
5246
globalMoveOnlyEnum = self // expected-note {{consumed here}}
5347
// expected-note @-1 {{consumed again here}}

0 commit comments

Comments
 (0)