File tree Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 6
6
// See http://swift.org/LICENSE.txt for license information
7
7
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
8
8
9
- // RUN: %target-swift-frontend %s -parse -verify
9
+ // RUN: not %target-swift-frontend %s -parse -verify
10
10
11
11
// Issue found by https://github.com/jvasileff (John Vasileff)
12
12
// This bug is NOT triggered when compiling with -O.
Original file line number Diff line number Diff line change @@ -266,15 +266,15 @@ _UnimplementedError()
266
266
//===----------------------------------------------------------------------===//
267
267
268
268
func testBitwiseOperationsImpl<T : UnsignedInteger>(_: T.Type) {
269
- var x = numericCast(0b11_1010_00) as T
270
- var y = numericCast(0b10_1100_10) as T
269
+ let x = numericCast(0b11_1010_00) as T
270
+ let y = numericCast(0b10_1100_10) as T
271
271
272
272
expectEqual(0b10_1000_00, x & y)
273
273
expectEqual(0b11_1110_10, x | y)
274
274
expectEqual(0b01_0110_10, x ^ y)
275
275
expectEqual(0b00_0101_11, (~x) & 0xff)
276
276
277
- var z = T.allZeros
277
+ let z = T.allZeros
278
278
expectEqual(x, x | z)
279
279
expectEqual(x, x ^ z)
280
280
expectEqual(z, x & z)
@@ -344,30 +344,14 @@ BoolTestSuite.test("init()") {
344
344
expectFalse(v)
345
345
}
346
346
347
- struct Booleanish : Boolean {
348
- let boolValue: Bool
349
- }
350
-
351
- BoolTestSuite.test("init<T : Boolean>(_:)") {
352
- do {
353
- let v = Bool(Booleanish(boolValue: false))
354
- expectFalse(v)
355
- }
356
- do {
357
- let v = Bool(Booleanish(boolValue: true))
358
- expectTrue(v)
359
- }
360
- }
361
-
362
347
BoolTestSuite.test("Boolean") {
363
348
do {
364
349
var v: Bool = false
365
- expectIsBooleanType(&v)
366
- expectFalse(v.boolValue)
350
+ expectFalse(v)
367
351
}
368
352
do {
369
353
var v: Bool = true
370
- expectTrue(v.boolValue )
354
+ expectTrue(v)
371
355
}
372
356
}
373
357
You can’t perform that action at this time.
0 commit comments