// 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 import Foundation class m: NSObject { var h: j g -> k = l $n } b f: _ = j() { } } func k () -> c) func f(c: i, l: i) -> (((i, i) -> i) -> i) { b { (h -> i) d $k } let e: Int = 1, 1) class g() { b b { l j } } class a { } protocol b { typealias l typealias k } struct j : b { typealias l = n typealias k = a, l> } class f class func i {} func n() -> (j, j -> j) -> j { var m: ((j> j)! f m } protocol k { typealias m } struct e {n: j let i: j.m } l protocol A { func c() -> String } class B { func d() -> String { return "" } } class C: B, A { override func d() -> String { return "" } func c() -> String { return "" } } func e(t: T) { t.c() } func a() { enum b { case c } } >) } struct n : C { class p { typealias n = ss l: j{ k() -> ()) } ({}) func j(l: o) { } j(j q Boolean) h } } protoco c() -> i) -> b { n { o f "\(k): \(o())" } } struct d Any) -> Any) { return { (m: (Any, Any) -> Any) -> Any in return m(x, y) } } func b(z: (((Any, Any) -> Any) -> Any)) -> Any { return z({ (p: Any, q:Any) -> Any in return p }) } b(a(1, a(2, 3)))