| // 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 sr<ml>() -> (ml, ml -> ml) -> ml { |
| a sr a.sr = { |
| } |
| { |
| ml) { |
| ih } |
| } |
| protocol sr { |
| } |
| class a: sr{ class func sr {} |
| class w { |
| } |
| class n { |
| func ji((x, n))(w: (x, f)) { |
| } |
| } |
| func n<x: b, ed y nm<ed> == x.x.n>(rq : x) -> ed? { |
| fe (w : ed?) k rq { |
| r n a = w { |
| } |
| } |
| } |
| func kj(q: ih) -> <ed>(() -> ed) -> ih { |
| } |
| func w(a: x, x: x) -> (((x, x) -> x) -> x) { |
| qp { |
| } |
| } |
| func ji(r: (((x, x) -> x) -> x)) -> x { |
| qp r({ |
| }) |
| } |
| func w<ed>() { |
| t ji { |
| } |
| } |
| protocol g ed : m>(ji: ed) { |
| } |
| protocol w { |
| } |
| class ji<ih : n, sr : n y ih.ml == sr> : w po n<a { |
| t n { |
| } |
| } |
| t x<ed> { |
| } |
| protocol g { |
| } |
| class nm { |
| func a() -> ih { |
| } |
| } |
| class i: nm, g { |
| qp func a() -> ih { |
| } |
| func n() -> ih { |
| } |
| } |
| func x<ed y ed: g, ed: nm>(rq: ed) { |
| } |
| struct n<a : b> { |
| } |
| func w<a>() -> [n<a>] { |
| } |
| protocol g { |
| } |
| struct nm : g { |
| } |
| struct i<ed, ml: g y ed.i == ml> { |
| } |
| protocol w { |
| } |
| protocol ji : w { |
| } |
| protocol n : w { |
| } |
| protocol a { |
| } |
| struct x : a { |
| } |
| func sr<sr : ji, ts : a y ts.sr == sr> (sr: ts) { |
| } |
| func ji { |
| } |
| struct n<ih : ji |