Files
swift-mirror/validation-test/compiler_crashers_fixed/01339-phi-node-operands-not-same-as-result.swift
David Farler 3f635d04c7 Reinstante var bindings in refutable patterns, except function parameters.
This reverts commits: b96e06da44,
                      8f2fbdc93a,
                      93b6962478,
                      64024118f4,
                      a759ca9141,
                      3434f9642b,
                      9f33429891,
                      47c043e8a6.

This commit leaves 'var' on function parameters as a warning to be
merged into Swift 2.2. For Swift 3, this will be an error, to be
converted in a follow-up.
2016-01-29 15:27:08 -08:00

23 lines
445 B
Swift

// RUN: %target-swift-frontend %s -emit-ir
// REQUIRES: objc_interop
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// http://www.openradar.me/18756378
import Foundation
enum A<T : AnyObject> {
case E(T)
}
class B {
}
func c(d : A<B>) {
switch (d) {
case .E(var e):
print("")
default:
print("")
}
}