mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
145 lines
2.3 KiB
Swift
145 lines
2.3 KiB
Swift
// 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 b([T]
|
|
let start = j> Any) {
|
|
var b {
|
|
func i("[1)
|
|
b[]
|
|
struct Q<A
|
|
}
|
|
typealias R = A, "foo")
|
|
func a
|
|
protocol A {
|
|
return S<(AnyObject, g<T> {
|
|
}
|
|
return "foobar")
|
|
}
|
|
protocol a {
|
|
func a")
|
|
override init(c {
|
|
}(t: AnyObject> Any) -> {
|
|
}
|
|
class a : $0))
|
|
typealias f : a())
|
|
var b where B = b: A, i : B? = e: AnyObject) {
|
|
typealias F = h> <l : T>() -> T>) {
|
|
typealias A {
|
|
}
|
|
}
|
|
func b(()
|
|
func i> S<T, i : Bool)
|
|
}
|
|
let n1: A {
|
|
func ^(self.advance(mx : T] = b
|
|
func e() {
|
|
protocol A {
|
|
struct c(T] = e() -> ()
|
|
struct e == 1
|
|
convenience init() -> T
|
|
return self.b: (b<I : b {
|
|
typealias R = F>(Any) -> {
|
|
}
|
|
}
|
|
func b
|
|
return g()
|
|
}
|
|
let d
|
|
deinit {
|
|
}
|
|
public class A<d<T : a {
|
|
}
|
|
func g<T>? = c
|
|
}
|
|
protocol a : ({
|
|
S.b {
|
|
}
|
|
b: [T> String {
|
|
var b {
|
|
}
|
|
var a(b((Range(.a"\(f<d<d>(t: c: (A<T] = i()
|
|
typealias g<f = [Byte](e: Any)
|
|
func b> Any)")
|
|
}
|
|
typealias b in
|
|
protocol B == b
|
|
func f() -> {
|
|
}
|
|
0] = d, end: Array) -> e> : Int -> : C((array: [1][$0
|
|
import Foundation
|
|
import Foundation
|
|
protocol b in 0
|
|
c: A, g.c {
|
|
protocol A {
|
|
}
|
|
self[Int
|
|
typealias b {
|
|
}
|
|
}
|
|
func c, b {
|
|
var d {
|
|
protocol c {
|
|
func f<T: d {
|
|
func g<T>(A"ab"A<T) -> {
|
|
let i("ab"foobar")
|
|
var f.A<T> T>(Range<(T) {
|
|
extension String {
|
|
func c, a(m: A<T {
|
|
}
|
|
class d>: A, (Any)(a<C> [T> A = { _, i> {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
struct S(Any) -> Any, Any) -> Void>()
|
|
}
|
|
func i: A.f : [$0) -> S : a {
|
|
struct d
|
|
}
|
|
return !.d {
|
|
}
|
|
f = T>
|
|
func g(t: A, A<f : c)()
|
|
switch x in return self.c(Any) {
|
|
func c<T, range.e : Int = []
|
|
}
|
|
assert() -> S {
|
|
class A {
|
|
convenience init(1, i<T>(self, range.dynamicType.c where h.c, range.h : AnyObject) -> {
|
|
(b
|
|
let h
|
|
func a(array: 1
|
|
typealias e : C> {
|
|
var c] = [T -> {
|
|
}
|
|
return true
|
|
extension NSSet {
|
|
get {
|
|
func b(A.d) in x }
|
|
print(1
|
|
class A : Array<T>() {
|
|
}
|
|
return S) {
|
|
}
|
|
typealias b = a<b, "cd"ab""cd")
|
|
class A.f = b: [0)
|
|
class A, V, object2: A, 3)
|
|
}
|
|
print(v: T] = a: a)
|
|
case s("A<T> T {
|
|
class A {
|
|
struct e == c<T
|
|
var b {
|
|
typealias A {
|
|
init(A
|
|
protocol a : ([unowned self.<d
|
|
b: Int], A, g = ")
|
|
}
|
|
}
|