blob: b70958a9f29a63c9f86fac80a0d06420c7391f37 [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
protocol a {
}
protocol b : a {
}
protocol c : a {
}
protocol d {
typealias f = a
}
struct e : d {
typealias f = b
}
func i<j : b, k : d where k.f == j> (n: k) {
}
func i<l : d where l.f = 0) {
}
let ch : c, i : c where }
}
f
e)
func f<g>() -> (g, g -> g) -> g {
d j d.i = {
}
{
g) {
c
}
}
imporsuper.init()
ny, Any) -> Any) -> Any)) -> Any {
return z({
(p: Any, q:Any) -> Any in
return p
})
}
b(a(1, a(2, 3)))
func prefix(with: String) -> <T>(() -> T return "\(with): \((a }
}
func some<S: Sequen: Int -> Int = {
{
g) {
h }
}
protocol f {
class func i()
}
class d: f{ class func i {}[]
}
potoco: a {
}
pr
struct A<T> {
let a: [(T, () -> ())] = []
}
protocol A {
func c() -> String
}
class B {
func d() -> String {
return 1
protocol A {
typealias B
}
class C<D{
}
f(true as Boolean)
class a {
typealias b = b
}
func a<T>() -> (T, T -> T) -> T {
var b: ((T, T -> T) -> T)!
return b
}
f
e)
func f<g>()s : S) -> T? {
for (mx : T?) in xs {
if let x = mx {
1 as a=1
s}
f
e)
func f<g>() -> (g, g -> g) -> g {
d j d.i = {
}
{
g) {
h }
}
protocol f {
class func i()
}
class d: f{ class func i {}
protocol A {
typealias B
}
class C<D> {
init <A: A where A.B == D>(e: A.B) {
}
}
func a<T>() -> (T, T -> T) -> T {
var b: ((T, T -> T) -> T)!
enum c {
func e
var _ = e
}
}
struct A<T> {
let a: alias g
}
func prefix(with: String) -> c-> c { class d:b class b