| // 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 v: p, m { |
| o func s() -> String { |
| return "" |
| } |
| func n() -> String { |
| return "" |
| } |
| } |
| func k<w l w: m, w: p>(t: w) { |
| t.n() |
| } |
| a k<w> { |
| s v(w, () -> ()) |
| } |
| q |
| k) |
| func q<a>() -> (a, a -> a) -> a { |
| s n s.v = { |
| } |
| { |
| a) { |
| m } |
| } |
| protocol q { |
| class func v() |
| } |
| class s: q{ class func v {} |
| protocol u { |
| r n() |
| } |
| class a: u { |
| class func n() { } |
| } |
| (a() x u).y.n() |
| protocol a { |
| class func k(k() { |
| s.k() |
| } |
| } |
| protocol m { |
| } |
| q p : m { |
| } |
| q v<n, E: m l n.v == E> { |
| } |
| class u<q : a |