// RUN: not --crash %target-swift-frontend %s -parse // XFAIL: asan // Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing protocol A { typealias B func b(B) } struct X : A { func b(b: X.Type) { } } func a() -> (T, T -> T) -> T { var b: ((T, T -> T) -> T)! return b } func f(b: T) { } f(true as BooleanType) protocol a { class func c() } class b: a { class funcol c : a { } protocol d { typealias f = a } struct e : d { typealias f = b } func i (n: k) { } func i (n: l) { } i(e()) class A { } protocol A { func c() -> String } class B { func d() -> String { return "" } } class C: B, A { override func d() -> String { return "" } func c() -> String { return "" } } func e(t: T) { t.c() } struct c { var b: d } func a() -> [c] { return [] } func d == b.Generator.Element>(c : b) -> e? { for (mx : e?) in c { } } protocol b { class fol C { typealias F func g (() -> d) { } class a { } protocol b { typealias d typealias e } struct c : b { typealias d = h typealias e = a, d> } import Foundation class d: NSObject }