|
1 | 1 | // Provides built-in Swift types |
2 | 2 |
|
3 | | -struct Bool {} |
| 3 | +struct Bool { |
| 4 | + public init() {} |
| 5 | +} |
4 | 6 |
|
5 | | -struct Int {} |
| 7 | +struct Int { |
| 8 | + public init() {} |
| 9 | +} |
6 | 10 |
|
7 | 11 | struct String { |
| 12 | + public init() {} |
8 | 13 | public init<T>(_ value: T) where T: LosslessStringConvertible { |
9 | 14 | fatalError("Dummy implementation.") |
10 | 15 | } |
11 | 16 | } |
12 | 17 |
|
13 | 18 | struct Character {} |
14 | 19 |
|
15 | | -struct Substring {} |
| 20 | +struct Substring { |
| 21 | + public init() {} |
| 22 | +} |
16 | 23 |
|
17 | | -struct Int8 {} |
| 24 | +struct Int8 { |
| 25 | + public init() {} |
| 26 | +} |
18 | 27 |
|
19 | | -struct Int16 {} |
| 28 | +struct Int16 { |
| 29 | + public init() {} |
| 30 | +} |
20 | 31 |
|
21 | | -struct Int32 {} |
| 32 | +struct Int32 { |
| 33 | + public init() {} |
| 34 | +} |
22 | 35 |
|
23 | | -struct Int64 {} |
| 36 | +struct Int64 { |
| 37 | + public init() {} |
| 38 | +} |
24 | 39 |
|
25 | | -struct UInt {} |
| 40 | +struct UInt { |
| 41 | + public init() {} |
| 42 | +} |
26 | 43 |
|
27 | | -struct UInt8 {} |
| 44 | +struct UInt8 { |
| 45 | + public init() {} |
| 46 | +} |
28 | 47 |
|
29 | | -struct UInt16 {} |
| 48 | +struct UInt16 { |
| 49 | + public init() {} |
| 50 | +} |
30 | 51 |
|
31 | | -struct UInt32 {} |
| 52 | +struct UInt32 { |
| 53 | + public init() {} |
| 54 | +} |
32 | 55 |
|
33 | | -struct UInt64 {} |
| 56 | +struct UInt64 { |
| 57 | + public init() {} |
| 58 | +} |
34 | 59 |
|
35 | | -struct Float16 {} |
| 60 | +struct Float16 { |
| 61 | + public init() {} |
| 62 | +} |
36 | 63 |
|
37 | | -struct Float {} |
| 64 | +struct Float { |
| 65 | + public init() {} |
| 66 | +} |
38 | 67 |
|
39 | | -struct Double {} |
| 68 | +struct Double { |
| 69 | + public init() {} |
| 70 | +} |
40 | 71 |
|
41 | | -struct Float80 {} |
| 72 | +struct Float80 { |
| 73 | + public init() {} |
| 74 | +} |
42 | 75 |
|
43 | 76 | struct Array<Element> { |
| 77 | + public init() {} |
| 78 | + public init<S>(_ elements: S) where S: Sequence, Element == S.Element {} |
| 79 | + public init( |
| 80 | + repeating repeatedValue: Element, |
| 81 | + count: Int |
| 82 | + ) {} |
| 83 | + public init<E>( |
| 84 | + unsafeUninitializedCapacity: Int, |
| 85 | + initializingWith initializer: (inout UnsafeMutableBufferPointer<Element>, inout Int) |
| 86 | + throws(E) -> Void |
| 87 | + ) throws(E) where E: Error {} |
44 | 88 | public func map<T, E>(_ transform: (Element) throws(E) -> T) throws(E) -> [T] |
45 | 89 | where E: Error { |
46 | 90 | fatalError("Dummy implementation.") |
47 | 91 | } |
48 | 92 | } |
49 | 93 |
|
50 | | -struct Dictionary<Key, Value> {} |
| 94 | +struct Dictionary<Key, Value> { |
| 95 | + public init() {} |
| 96 | + public init(minimumCapacity: Int) {} |
| 97 | + public init<S>(uniqueKeysWithValues keysAndValues: S) |
| 98 | + where S: Sequence, S.Element == (Key, Value) {} |
| 99 | + public init<S, E>( |
| 100 | + _ keysAndValues: S, |
| 101 | + uniquingKeysWith combine: (Value, Value) throws(E) -> Value |
| 102 | + ) throws(E) where S: Sequence, E: Error, S.Element == (Key, Value) {} |
| 103 | + public init<S, E>( |
| 104 | + grouping values: S, |
| 105 | + by keyForValue: (S.Element) throws(E) -> Key |
| 106 | + ) throws(E) where Value == [S.Element], S: Sequence, E: Error {} |
| 107 | +} |
51 | 108 |
|
52 | | -struct Set<Element> {} |
| 109 | +struct Set<Element> { |
| 110 | + public init() {} |
| 111 | + public init(minimumCapacity: Int) {} |
| 112 | + public init<Source>(_ sequence: Source) where Element == Source.Element, Source: Sequence {} |
| 113 | +} |
53 | 114 |
|
54 | 115 | enum Optional<Wrapped> { |
55 | 116 | case none |
|
0 commit comments