mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
9 lines
373 B
Swift
9 lines
373 B
Swift
// RUN: %swift -verify -parse %s
|
|
|
|
func testUnaryMinusInUnsigned() {
|
|
var a: UInt8 = -(1) // expected-error {{expression does not type-check}}
|
|
var b: UInt16 = -(1) // expected-error {{expression does not type-check}}
|
|
var c: UInt32 = -(1) // expected-error {{expression does not type-check}}
|
|
var d: UInt64 = -(1) // expected-error {{expression does not type-check}}
|
|
}
|