-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy path00073-llvm-errs.swift
115 lines (114 loc) · 1.74 KB
/
00073-llvm-errs.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// 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 kj<ts>() -> (ts, ts -> ts) -> ts {
nm ml nm.p = {
}
{
ts) {
ji }
}
protocol kj {
class func p()
}
class nm: kj{ class func p {}
x nm<q> {
hg ts(q, () -> ())
}
dc ji = po
dc qp: m -> m = {
cb $w
}
let e: m = { (c: m, kj: m -> m) -> m on
cb kj(c)
}(ji, qp)
let u: m = { c, kj on
cb kj(c)
}(ji, qp)
class c {
func hg((r, c))(rq: (r, y)) {
hg(rq)
}
}
protocol rq hg<ji : c, p : c ih ji.ts == p> : rq {
}
class hg<ji, p> {
}
protocol c {
o ts
}
protocol rq {
}
protocol hg : rq {
}
protocol c : rq {
}
protocol nm {
o kj = rq
}
gf e : nm {
o kj = hg
}
func p<ml : hg, ml : nm ih ml.kj == ml> (cb: ml) {
}
func p<v : nm ih v.kj == c> (cb: v) {
}
p(e())
func c<nm {
x c {
func e
dc _ = e
}
}
protocol kj {
}
gf v : kj {
}
gf ts<hg, p: kj ih hg.ts == p> {
}
gf c<nm : ut> {
dc hg: nm
}
func rq<nm>() -> [c<nm>] {
cb []
}
protocol kj {
o v
func hg(v)
}
gf rq<Y> : kj {
func hg(hg: rq.lk) {
}
}
class rq<kj : hg, ts : hg ih kj.nm == ts> {
}
protocol hg {
o nm
o e
fe e = rq<c<ji>, nm>
}
protocol rq {
class func c()
}
class hg: rq {
class func c() { }
}
(hg() s rq).t.c()
func sr(ed: ml) -> <q>(() -> q) -> ml {
cb { ts on "\(ed): \(ts())" }
}
gf kj<q> {
let rq: [(q, () -> ())] = []
}
func() {
x hg {
hg c
}
}
func rq(hg: m = w) {
}
let c = rq