Skip to content

Commit 3b051a2

Browse files
committed
Convert tabs to spaces in test/Sema/conformance_availability.swift
1 parent 3343a6a commit 3b051a2

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

test/Sema/conformance_availability.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -216,33 +216,33 @@ func passAvailableConformance1a(x: HasAvailableConformance1) {
216216

217217
// Associated conformance with unavailability
218218
protocol Rider {
219-
associatedtype H : Horse
219+
associatedtype H : Horse
220220
}
221221

222222
struct AssocConformanceUnavailable : Rider {
223223
// expected-error@-1 {{conformance of 'HasUnavailableConformance1' to 'Horse' is unavailable}}
224224
// expected-note@-2 {{in associated type 'Self.H' (inferred as 'HasUnavailableConformance1')}}
225-
typealias H = HasUnavailableConformance1
225+
typealias H = HasUnavailableConformance1
226226
}
227227

228228
// Associated conformance with deprecation
229229
struct AssocConformanceDeprecated : Rider {
230230
// expected-warning@-1 {{conformance of 'HasDeprecatedConformance1' to 'Horse' is deprecated}}
231231
// expected-note@-2 {{in associated type 'Self.H' (inferred as 'HasDeprecatedConformance1')}}
232-
typealias H = HasDeprecatedConformance1
232+
typealias H = HasDeprecatedConformance1
233233
}
234234

235235
// Associated conformance with availability
236236
struct AssocConformanceAvailable1 : Rider {
237237
// expected-error@-1 {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
238238
// expected-note@-2 {{in associated type 'Self.H' (inferred as 'HasAvailableConformance1')}}
239239
// expected-note@-3 {{add @available attribute to enclosing struct}}
240-
typealias H = HasAvailableConformance1
240+
typealias H = HasAvailableConformance1
241241
}
242242

243243
@available(macOS 100, *)
244244
struct AssocConformanceAvailable2 : Rider {
245-
typealias H = HasAvailableConformance1
245+
typealias H = HasAvailableConformance1
246246
}
247247

248248
struct AssocConformanceAvailable3 {}
@@ -251,25 +251,25 @@ extension AssocConformanceAvailable3 : Rider {
251251
// expected-error@-1 {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
252252
// expected-note@-2 {{in associated type 'Self.H' (inferred as 'HasAvailableConformance1')}}
253253
// expected-note@-3 {{add @available attribute to enclosing extension}}
254-
typealias H = HasAvailableConformance1
254+
typealias H = HasAvailableConformance1
255255
}
256256

257257
struct AssocConformanceAvailable4 {}
258258

259259
@available(macOS 100, *)
260260
extension AssocConformanceAvailable4 : Rider {
261-
typealias H = HasAvailableConformance1
261+
typealias H = HasAvailableConformance1
262262
}
263263

264264
// Solution ranking should down-rank solutions involving unavailable conformances
265265
protocol First {}
266266
extension First {
267-
func doStuff<T>(_: T) -> Bool {}
267+
func doStuff<T>(_: T) -> Bool {}
268268
}
269269

270270
protocol Second {}
271271
extension Second {
272-
func doStuff(_: Int) -> Int {}
272+
func doStuff(_: Int) -> Int {}
273273
}
274274

275275
struct ConformingType1 {}
@@ -281,16 +281,16 @@ extension ConformingType1 : Second {}
281281

282282
func usesConformingType1(_ c: ConformingType1) {
283283
// We should pick First.doStuff() here, since Second.doStuff() is unavailable
284-
let result = c.doStuff(123)
285-
let _: Bool = result
284+
let result = c.doStuff(123)
285+
let _: Bool = result
286286
}
287287

288288
@available(macOS 100, *)
289289
func usesConformingType1a(_ c: ConformingType1) {
290290
// We should pick Second.doStuff() here, since it is more specialized than
291291
// First.doStuff()
292-
let result = c.doStuff(123)
293-
let _: Int = result
292+
let result = c.doStuff(123)
293+
let _: Int = result
294294
}
295295

296296
// Same as above but unconditionally unavailable
@@ -303,22 +303,22 @@ extension ConformingType2 : Second {}
303303

304304
func usesConformingType2(_ c: ConformingType2) {
305305
// We should pick First.doStuff() here, since Second.doStuff() is unavailable
306-
let result = c.doStuff(123)
307-
let _: Bool = result
306+
let result = c.doStuff(123)
307+
let _: Bool = result
308308
}
309309

310310
// Make sure this also works for synthesized conformances
311311
struct UnavailableHashable {
312-
let x: Int
313-
let y: Int
312+
let x: Int
313+
let y: Int
314314
}
315315

316316
@available(macOS 100, *)
317317
extension UnavailableHashable : Hashable {}
318318

319319
func usesUnavailableHashable(_ c: UnavailableHashable) {
320320
// expected-note@-1 2 {{add @available attribute to enclosing global function}}
321-
_ = Set([c])
322-
// expected-error@-1 2 {{conformance of 'UnavailableHashable' to 'Hashable' is only available in macOS 100 or newer}}
323-
// expected-note@-2 2 {{add 'if #available' version check}}
321+
_ = Set([c])
322+
// expected-error@-1 2 {{conformance of 'UnavailableHashable' to 'Hashable' is only available in macOS 100 or newer}}
323+
// expected-note@-2 2 {{add 'if #available' version check}}
324324
}

0 commit comments

Comments
 (0)