Files
swift-mirror/validation-test/compiler_crashers_fixed/0192-swift-astcontext-setconformsto.swift
Chris Lattner 31c01eab73 Change the meaning of "if let x = foo()" back to Xcode 6.4 semantics. The compiler
includes a number of QoI things to help people write the correct code.  I will commit
the testcase for it as the next patch.

The bulk of this patch is moving the stdlib, testsuite and validation testsuite to
the new syntax.  I moved a few uses of "as" patterns back to as? expressions in the 
stdlib as well.



Swift SVN r27959
2015-04-30 04:38:13 +00:00

42 lines
776 B
Swift

// RUN: not %target-swift-frontend %s -parse
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
protocol A {
}
struct B : A {
}
struct C<D, E: A where D.C == EType, T where Optional<T> == S.Generator.Element>(xs : S) -> T? {
for (mx : T?) in xs {
if let x = mx {
return x
}
}
return nil
}
let xs : [Int?] = [nil, 4, nil]
println(some(xs))
protocol a : a {
}
protocol a {
typealias d
typealia
typealias g
}
f: A where D.C == E> {s func c() { }
}
(b() as a).dynamicType.c()
func c<d {
enumBooleanType)
class a {
typealias b = b
}
func a<T>() -> A {
typeal= D>(e: A.B) {
}
}
var() -> ())] = []
}