mirror of
https://github.com/apple/swift.git
synced 2026-10-26 20:15:53 +01:00
19 lines
564 B
Swift
19 lines
564 B
Swift
// {"kind":"emit-silgen","original":"3306f7ce","signature":"(anonymous namespace)::PatternMatchEmission::emitDestructiveCaseBlocks()::ConsumingPatternBindingVisitor::visitEnumProjection(swift::Lowering::ManagedValue, swift::EnumElementDecl*, swift::SILLocation, swift::Pattern*)","signatureNext":"Lowering::SILGenFunction::emitSwitchStmt"}
|
|
// RUN: not --crash %target-swift-frontend -emit-silgen %s
|
|
struct a {
|
|
}
|
|
enum b {
|
|
}
|
|
enum c: ~Copyable {
|
|
case d(b)
|
|
case e
|
|
}
|
|
func f(h: consuming c) {
|
|
switch consume h {
|
|
case .d(let g as a):
|
|
g
|
|
case .e:
|
|
0
|
|
}
|
|
}
|