Skip to content

Commit 9c2bc50

Browse files
committed
In some cases, the same type error will result in different diagnostics being emitted between ARM and x86 targets.
Addressing rdar://problem/19434979 will allow us to swizzle expected errors based on build configuration options, but until I can push that change we should generalize a few of the expected errors in the FixedPointDiagnostics test, and re-enable the test on ARM. Swift SVN r24910
1 parent af349b7 commit 9c2bc50

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

validation-test/stdlib/FixedPointDiagnostics.swift.gyb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/main.swift
22
// RUN: %S/../../utils/line-directive %t/main.swift -- %target-swift-frontend -parse -verify %t/main.swift
33

4-
// <rdar://problem/19677545> Type checker diagnostics differ between platforms for "var a: UInt8 = -(1)"
5-
// XFAIL: CPU=arm64
6-
// XFAIL: CPU=armv7
4+
// Pending a fix for <rdar://problem/19434979>, remove exact diagnostic strings.
75

86
func testUnaryMinusInUnsigned() {
9-
var a: UInt8 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
10-
var b: UInt16 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
11-
var c: UInt32 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
12-
var d: UInt64 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
7+
var a: UInt8 = -(1) // expected-error {{}}
8+
var b: UInt16 = -(1) // expected-error {{}}
9+
var c: UInt32 = -(1) // expected-error {{}}
10+
var d: UInt64 = -(1) // expected-error {{}}
1311
}
1412

1513
// Int and UInt are not identical to any fixed-size integer type

0 commit comments

Comments
 (0)