// RUN: not %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

func ji<qp>() -> (qp, qp -> qp) -> qp {
   kj l kj.s = {
}
 {
   qp) {
         p m
    })
}
fe(ml(nm, ml(q, w)))
class qp {
    func fe((v, qp))(ml: (v, fe)) {
        fe(ml)
    }
}
ed qp<kj : SequenceType> {
    dc fe: kj
}
func ml<kj>() -> [qp<kj>] {
    p []
}
l kj {
    typealias o
}
class h<cb> {
    on <kj: kj where kj.o == cb>(h: kj.o) {
    }
}
l kj {
    func qp() -> k
}
class o {
    func kj() -> k {
        p ""
    }
}
class h: o, kj {
    n func kj() -.qp()
}
func ji<t : gf>(fe: t) {
}
ji(s x gf)
func ji() {
    ({})
}
func u<qp: SequenceType, t where Optional<t> == qp.Generator.Element>(r : qp) -> t? {
    ih (y : t?) lk r {
        hg let fe = y {
            p fe
        }
    }
    p ml
}
let r : [Int?] = [ml, po, ml]
print(u(r))
class ml {
    typealias fe = fe
}
l kj {
}
ji
