Skip to content

Commit 5cb6ad1

Browse files
authored
Merge pull request #8756 from rudkx/fix-rdar19677545
Reinstate diagnostics for assignment from Int to unsigned types.
2 parents ce3f098 + f256410 commit 5cb6ad1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

validation-test/stdlib/FixedPointDiagnostics.swift.gyb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
// RUN: %line-directive %t/main.swift -- %target-swift-frontend -typecheck -verify %t/main.swift
33

44
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 * {{}}
66

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 * {{}}
88

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 * {{}}
1010

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 * {{}}
1212
}
1313

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

0 commit comments

Comments
 (0)