mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
// RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/main.swift
|
||||
// RUN: %S/../../utils/line-directive %t/main.swift -- %target-swift-frontend -parse -verify %t/main.swift
|
||||
|
||||
// <rdar://problem/19677545> Type checker diagnostics differ between platforms for "var a: UInt8 = -(1)"
|
||||
// XFAIL: CPU=arm64
|
||||
// XFAIL: CPU=armv7
|
||||
// Pending a fix for <rdar://problem/19434979>, remove exact diagnostic strings.
|
||||
|
||||
func testUnaryMinusInUnsigned() {
|
||||
var a: UInt8 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
|
||||
var b: UInt16 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
|
||||
var c: UInt32 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
|
||||
var d: UInt64 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}
|
||||
var a: UInt8 = -(1) // expected-error {{}}
|
||||
var b: UInt16 = -(1) // expected-error {{}}
|
||||
var c: UInt32 = -(1) // expected-error {{}}
|
||||
var d: UInt64 = -(1) // expected-error {{}}
|
||||
}
|
||||
|
||||
// Int and UInt are not identical to any fixed-size integer type
|
||||
|
||||
Reference in New Issue
Block a user