Skip to content

Commit 741c4db

Browse files
committed
SIL: Fix up an old test
1 parent 1f79af7 commit 741c4db

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

test/SIL/Parser/basic.sil

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ bb0(%0: $Optional<D>):
279279
// Generated from:
280280
// func archetype_member_ref<T:Runcible>(x:T) {
281281
// x.free_method()
282-
// var u = x.associated_method()
283282
// T.static_method()
284283
// }
285284

@@ -290,28 +289,20 @@ protocol Runcible {
290289
static func static_method()
291290
}
292291

293-
/* SIL parsing of substitutions in apply insts is totally busted.
294-
// C/HECK: $@convention(thin) <T : Runcible> (@in T) -> ()
292+
// CHECK: $@convention(thin) <T where T : Runcible> (@in T) -> ()
295293
sil @_T4arch20archetype_member_refUS_8Runcible___FT1xQ__T_ : $@convention(thin) <T : Runcible> (@in T) -> () {
296294
bb0(%0 : $*T):
297-
// C/HECK: witness_method $*T, #Runcible.free_method!1
298-
%1 = witness_method $*T, #Runcible.free_method!1 : $@cc(method) (@inout T) -> Int
299-
%2 = apply %1(%0) : $@cc(method) (@inout T) -> Int
300-
%3 = alloc_stack $@thick T.U.Type
301-
// C/HECK: witness_method $*T, #Runcible.associated_method!1
302-
%4 = witness_method $*T, #Runcible.associated_method!1 : $@cc(method) (@inout T) -> @thick T.U.Type
303-
%5 = apply %4(%0) : $@cc(method) (@inout T) -> @thick T.U.Type
304-
store %5 to %3 : $*@thick T.U.Type
305-
%7 = metatype $@thick T.Type
306-
// C/HECK: objc_method $*T, #Runcible.static_method!1
307-
%8 = objc_method $*T, #Runcible.static_method!1 : $(@thick T.Type) -> ()
308-
%9 = apply %8(%7) : $(@thick T.Type) -> ()
309-
dealloc_stack %3 : $*@thick T.U.Type
310-
%11 = tuple ()
295+
// CHECK: witness_method $T, #Runcible.free_method!1
296+
%1 = witness_method $T, #Runcible.free_method!1 : $@convention(witness_method: Runcible) <Self : Runcible> (@in Self) -> Int
297+
%2 = apply %1<T>(%0) : $@convention(witness_method: Runcible) <Self : Runcible> (@in Self) -> Int
298+
%3 = metatype $@thick T.Type
299+
// CHECK: witness_method $T, #Runcible.static_method!1
300+
%4 = witness_method $T, #Runcible.static_method!1 : $@convention(witness_method: Runcible) <Self : Runcible> (@thick T.Type) -> ()
301+
%5 = apply %4<T>(%3) : $@convention(witness_method: Runcible) <Self : Runcible> (@thick T.Type) -> ()
302+
%6 = tuple ()
311303
destroy_addr %0 : $*T
312-
return %11 : $()
304+
return %6 : $()
313305
}
314-
*/
315306

316307
protocol Bendable { }
317308

0 commit comments

Comments
 (0)