mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A previous PR (https://github.com/apple/swift/pull/32407) that mass-modified tests left some duplicate `RUN:` lines behind.
14 lines
667 B
Swift
14 lines
667 B
Swift
// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -o /dev/null -verify
|
|
|
|
// <rdar://problem/18213320> enum with raw values that are too big are not diagnosed
|
|
enum EnumWithTooLargeElements : UInt8 {
|
|
case negativeOne = -1 // expected-error 2 {{negative integer '-1' overflows when stored into unsigned type 'UInt8'}}
|
|
case one = 1
|
|
case two = 2
|
|
case three
|
|
case twoHundredFiftyFour = 254
|
|
case twoHundredFiftyFive
|
|
case twoHundredFiftySix // expected-error 2 {{integer literal '256' overflows when stored into 'UInt8'}}
|
|
case tooFarByFar = 123456 // expected-error 2 {{integer literal '123456' overflows when stored into 'UInt8'}}
|
|
}
|