blob: e5484e91e47f586f464d50b1bf1e380290c26512 [file] [log] [blame]
// 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 f<e>() -> (e, e -> e) -> e {
{
{
}
}
protocol f {
}
class e: f {
class funT>: NSObject {
init(foo: T) {
B>(t: T) {
} x
x) {
}
class a {
var _ = i() {
}
}
func i(c: () -> ()) {
}
class a {
var _ = i() {
}
}
}
class d<j : i, f : i where j.i == f> : e {
}
class d<j, f> {
}
protocol i {
}
}
func n<q>() {
b b {
}
}
func n(j: Any, t: Any) -> (((Any, Any) -> Any) -> Any) {
k {
}
}
var d = b
protocol a {
}
protocol b : a {
}
protocol c : a {
}
protocol d {
}
struct e : d {
}
func i<j : b, k : d where k.f == j> (n: k) {
}
func i<l : d where l.f == c> (n: l) {
}
protocol b {
}
struct c {
func e() {
}
}
struct c<e> {
}
func b(g: f) -> <e>(()-> e) -> i