Skip to content

Commit d5a21fa

Browse files
committed
DI: Tweak definite_init_markuninitialized_derivedself.sil test to match what SILGen actually emits
1 parent 1187890 commit d5a21fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/SILOptimizer/definite_init_markuninitialized_derivedself.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ bb0(%0 : @owned $DerivedClassWithIVars):
121121
%14 = function_ref @superinit : $@convention(method) (@owned RootClassWithIVars) -> @owned RootClassWithIVars
122122
%15 = apply %14(%13) : $@convention(method) (@owned RootClassWithIVars) -> @owned RootClassWithIVars // expected-error {{property 'self.a' not initialized at super.init call}}
123123
%16 = unchecked_ref_cast %15 : $RootClassWithIVars to $DerivedClassWithIVars
124-
assign %16 to %3 : $*DerivedClassWithIVars
124+
store %16 to [init] %3 : $*DerivedClassWithIVars
125125

126126
%18 = load [copy] %3 : $*DerivedClassWithIVars
127127
destroy_value %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
@@ -272,7 +272,7 @@ bb0(%0 : @owned $DerivedClassWithIVars, %i : @trivial $Int):
272272
// Call super.init.
273273
%15 = apply %14(%13) : $@convention(method) (@owned RootClassWithIVars) -> @owned RootClassWithIVars
274274
%16 = unchecked_ref_cast %15 : $RootClassWithIVars to $DerivedClassWithIVars
275-
assign %16 to %3 : $*DerivedClassWithIVars
275+
store %16 to [init] %3 : $*DerivedClassWithIVars
276276
%18 = load [copy] %3 : $*DerivedClassWithIVars
277277
destroy_value %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
278278
return %18 : $DerivedClassWithIVars

0 commit comments

Comments
 (0)