mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
290 B
Swift
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()
|
|
}
|
|
}
|
|
}
|