File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,7 @@ func testArithmeticOverflow() {
34
34
xu8_3 += 40 // expected-error {{arithmetic operation '240 + 40' (on type 'UInt8') results in an overflow}}
35
35
var _ : UInt8 = 240 + 5 + 15 // expected-error {{arithmetic operation '245 + 15' (on type 'UInt8') results in an overflow}}
36
36
37
- var _ = Int8 ( 126 ) + Int8( 1 + 1 ) // FIXME: false negative: overflow that is not
38
- // caught by diagnostics (see also <rdar://problem/39120081>).
37
+ var _ = Int8 ( 126 ) + Int8( 1 + 1 ) // expected-error{{arithmetic operation '126 + 2' (on type 'Int8') results in an overflow}}
39
38
40
39
var _: Int8 = ( 1 << 7 ) - 1 // FIXME: false negative: should expect an error
41
40
// like {{arithmetic operation '-128 - 1' (on type 'Int8') results in an overflow}}
You can’t perform that action at this time.
0 commit comments