| // This source file is part of the Swift.org open source project |
| // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors |
| // Licensed under Apache License v2.0 with Runtime Library Exception |
| // |
| // See http://swift.org/LICENSE.txt for license information |
| // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors |
| |
| // RUN: not %target-swift-frontend %s -parse |
| struct d<f : e, g: e where g.h == f.h> { |
| } |
| protocol e { |
| typealias h |
| } |
| protocol a { |
| class func c() |
| } |
| class b: a { |
| c T) { |
| } |
| f(true as Boolean) |
| func f() { |
| ({}) |
| } |
| import Foundation |
| class Foo<T>: 1) |
| func c<d { |
| enum c { |
| func e |
| var _ = e |
| } |
| } |
| struct c<d : Sequence> { |
| var b: d |
| } |
| func a<d>() -> [c<d>] -> Bool { |
| return !(a) |
| } |
| protocol a { |
| class func c() |
| class b: a { |
| class func c() { } |
| } |
| (b() as a).dynamicType.c() |
| b |
| protocol c : b { func b |
| func some<S: Sequence, T where Optional<T> == S.Iterator.Element>(xs : S) -> T? { |
| for (mx : if let x = mx { |
| d: f{ ceanTy b { |
| clasi() { |
| } |
| } |
| func a(b: Int = 0) { |
| } |
| let c = a |
| c() |
| proto func b(B X<Y> : A { |
| funrn z({ |
| (p: Any, q:Any) -> Any in |
| return p |
| }) |
| } |
| b(a(1, a(2, 3))) |
| protocol A { |
| typealias E |
| } |
| struct B<T : As a { |
| typealias b = b |
| } |
| func a<T>() {f { |
| class func i() |
| } |
| class d: f{ class func i {} |
| func f() { |
| ({}) |
| } |
| func prefix(with: String) -> <T>(() -> T) -> String { |
| return { g in "\(with): \(g())" } |
| } |
| protocol a : a { |
| } |
| import Foundation |
| class Foo<T>: NSObject { |
| var foo: T |
| = 1 |
| var f1: Int -> Int = return $0 |
| } |
| let succeeds: Intr _ = i() { |
| } |
| } |
| func c<d { |
| enum c { |
| func e |
| var _ = e |
| } |
| } |
| class a<f : b, g : b where f.d == g> { |
| } |
| protocol b { |
| typealias d |
| typealias e |
| } |
| struct c<h : b> : b { |
| typealias d = h |
| typealias e = a<c<h>, d> |
| } |
| func f<T : Boolean>(b: T) { |
| } |
| f(true as Boolean) |
| func i(c: () -> ()) { |
| } |
| c1, f1) |
| func prefix(with: String) -> <T>(() -> T) -> String { |
| return { h):g())" } |
| } |
| .a() |
| } |
| b |
| func b<c-> c { class d:b class b |
| protocol a : a { |
| } |
| protocol a { |
| typealias d |
| typealias e = d |
| typealeanType>(b: T) { |
| } |
| f(true as Boolean) |
| func a<T>() { |
| enum b { |
| case c |
| } |
| } |
| func prefix(with: String) -> <T>(() -> T)> Int { |
| return [] |
| } |
| protocol A |