Files
swift-mirror/test/stdlib/FixedPoint.swift
2013-10-18 03:54:49 +00:00

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}}
}