File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
// RUN: %line-directive %t/main.swift -- %target-swift-frontend -typecheck -verify %t/main.swift
3
3
4
4
func testUnaryMinusInUnsigned() {
5
- var a: UInt8 = -(1) // expected-error {{}} expected-note * {{}} expected-warning * {{}}
5
+ var a: UInt8 = -(1) // expected-error {{cannot convert value of type 'Int' to specified type 'UInt8' }} expected-note * {{}} expected-warning * {{}}
6
6
7
- var b: UInt16 = -(1) // expected-error {{}} expected-note * {{}} expected-warning * {{}}
7
+ var b: UInt16 = -(1) // expected-error {{cannot convert value of type 'Int' to specified type 'UInt16' }} expected-note * {{}} expected-warning * {{}}
8
8
9
- var c: UInt32 = -(1) // expected-error {{}} expected-note * {{}} expected-warning * {{}}
9
+ var c: UInt32 = -(1) // expected-error {{cannot convert value of type 'Int' to specified type 'UInt32' }} expected-note * {{}} expected-warning * {{}}
10
10
11
- var d: UInt64 = -(1) // expected-error {{}} expected-note * {{}} expected-warning * {{}}
11
+ var d: UInt64 = -(1) // expected-error {{cannot convert value of type 'Int' to specified type 'UInt64' }} expected-note * {{}} expected-warning * {{}}
12
12
}
13
13
14
14
// Int and UInt are not identical to any fixed-size integer type
You can’t perform that action at this time.
0 commit comments