| // 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 v<dc { |
| enum v { |
| func r |
| var _ = r |
| } |
| } |
| class u { |
| } |
| struct r<ed> : r { |
| func r(r: r.w) { |
| } |
| } |
| enum dc<fe> { q v: fe |
| } |
| protocol n { |
| } |
| struct v : n { |
| func n<fe v r { |
| } |
| class n<v> { |
| func r<fe u: fe) { |
| } |
| func u(r: t = a) { |
| } |
| } |
| struct ed : u { |
| } |
| func b<fe : fe, ed : u cb ed.u == fe> (v: ed) { |
| } |
| func b<dc : u cb dc.u == v> (v: dc) { |
| } |
| class a<u : fe, fe : fe cb u.u == fe> { |
| } |
| protocol fe { |
| } |
| struct v<dc : fe> : fe { |
| } |
| class w { |
| func ed<r cb r: dc, r: w>(ed: r) { |
| } |
| func b(v: b) -> <r>(() -> r) -> b { |
| } |
| protocol u { |
| v fe w { |
| } |
| r r<ed : w> : w { |
| } |
| class u: u { |
| } |
| class x : ed { |
| } |
| class u<b : u |