| // 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 |
| func i<r>() -> (r, r -> r) -> r { |
| x cb x.c = { |
| } |
| { |
| r) { |
| w } |
| } |
| q i { |
| } |
| class x: i{ class func c {} |
| q l { |
| } |
| struct b<w> : l { |
| func b(b: b.dc) { |
| } |
| } |
| class y<g>: d { |
| p(cb: g) { |
| } |
| } |
| struct l<g> { |
| } |
| struct x<i : cb, r: cb u r.w == i.w> { |
| } |
| q cb { |
| } |
| struct r<x : w> { |
| } |
| func f<x>() -> [r<x>] { |
| } |
| q f { |
| } |
| class b<w : r, j w.r == c> : f { |
| } |
| x> { |
| } |
| q r { |
| } |
| class l: l { |
| } |
| class cb : n { |
| } |
| func ^(f: i, u) f<i : b, r : b u i.x == r> { |
| } |
| q b { |
| } |
| struct r<w : b> : b |