// 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 e<gf {
enum e {
func e
q {
}
class gf: q{  w() -> ())
}
func q<y : Boolean>(gf: y) {
}
func ed(gf: Any, hg: Any) -> (((Any, Any) -> Any) -> Any) {
return {
(ed: (Any, Any) -> Any) -> Any in
func q<q : gf,) {
}
q(e())
i.m == n> {ed func q() { }
}
}
i> {
}
func b(d: y) -> <cb>(() -> cb)() {
func a(hg: v = ih) {
}
func y<y>() -> (y, y -> y) -> y {
q q q.y = {
}
{
y) {
m  }
}
ed y {
}
class q: y{  class func y {}
e y<q : e> {
}
func q<f>() {
hg hg {
}
}
func q(q: Any, y: Any) -> (((Any, Any) -> Any) -> Any) {
w {
}
}
func hg(ed: (((gf, Any) -> Any) -> Any)
