Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0194-rdar49731284.swift
Doug Gregor 90d9721473 [Type checker] Fix a crash-on-invalid in pattern type checking.
Fixes rdar://problem/49731284.
2019-05-07 13:58:30 -07:00

13 lines
290 B
Swift

// RUN: not %target-swift-frontend -typecheck %s
open class Foo {
open class func foo<T: Equatable>(value: T?, other: T?) {
switch (value, other) {
case (.some(let unwrappedValue &), .none): // the & here triggers it
fallthrough
default:
fatalError()
}
}
}