Files
swift-mirror/test/SILGen/partial_apply_throws.swift
2020-03-19 02:20:21 -04:00

15 lines
605 B
Swift

// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
class C {
func foo() throws { }
}
_ = C.foo
// CHECK-LABEL: sil private [ossa] @$s20partial_apply_throwsyyKcAA1CCcfu_ : $@convention(thin) (@guaranteed C) -> @owned @callee_guaranteed () -> @error Error {
// CHECK-LABEL: sil private [ossa] @$s20partial_apply_throwsyyKcAA1CCcfu_yyKcfu0_ : $@convention(thin) (@guaranteed C) -> @error Error {
// CHECK: [[FN:%.*]] = class_method %0 : $C, #C.foo : (C) -> () throws -> (), $@convention(method) (@guaranteed C) -> @error Error
// CHECK: try_apply [[FN]](%0)
// CHECK: return
// CHECK: throw