| // This source file is part of the Swift.org open source project |
| // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors |
| // Licensed under Apache License v2.0 with Runtime Library Exception |
| // |
| // See https://swift.org/LICENSE.txt for license information |
| // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors |
| |
| // RUN: not %target-swift-frontend %s -typecheck |
| } |
| class f<p : k, p : k n p.d> : o { |
| } |
| class fclass func i() |
| } |
| i |
| (d() as e).j.i() |
| d |
| protocol i : d { func d |
| a=1 as a=1 |
| } |
| func a<g>() -> (g, g -> g) -> g { |
| var b: ((g, g -> g) -> g)! |
| return b |
| } |
| func f<g : d { |
| return !(a) |
| enum g { |
| func g |
| var _ = g |
| func f<T : Boolean>(b: T) { |
| } |
| f(true as Boolean) |
| struct c<d: Sequence, b where Optional<b> == d.Iterator.Element> |
| var f = 1 |
| var e: Int -> Int = { |
| return $0 |
| } |
| let d: Int = { c, b in |
| }(f, e) |
| classwhere A.B == D>(e: A.B) { |
| } |
| } |
| func a() as a).dynamicType.c() |
| func prefix(with: String) -> <T>(() -> T) -> String { |
| return { g in "\(with): \(g())" } |
| } |
| struct d<f : e, g: e where g.h == f.h> { |
| } |
| protocol e { |
| typealias h |
| } |
| protocol a : a { |
| } |
| funcol n { |
| j q |
| } |
| protocol k : k { |
| } |
| class k<f : l, q : l p f.q == q> { |
| } |
| protocol l { |
| j q |
| j o |
| } |
| struct n<r : l> |
| class c { |
| func b((Any, c))(a: (Any, AnyObject)) { |
| b(a) |
| } |
| } |