Skip to content

Commit f984696

Browse files
authored
Merge pull request #3436 from nohirap/The_name_change_of_the_enum_of_case
2 parents 7ae2ea2 + 52e426c commit f984696

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
enum Foo : Int {
2-
case A = 0
2+
case a = 0
33
}
44

55
enum Bar : UInt {
6-
case A = 0
7-
case B = 22
6+
case a = 0
7+
case b = 22
88
}
99

1010
enum Baz : UInt {
11-
case A = 0
11+
case a = 0
1212
}
1313

1414
enum Garply : String {
15-
case A = "A"
15+
case a = "A"
1616
}

test/Sema/enum_raw_representable.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
// RUN: %target-parse-verify-swift
22

33
enum Foo : Int {
4-
case A, B, C
4+
case a, b, c
55
}
66

7-
var raw1: Int = Foo.A.rawValue
7+
var raw1: Int = Foo.a.rawValue
88
var raw2: Foo.RawValue = raw1
99
var cooked1: Foo? = Foo(rawValue: 0)
1010
var cooked2: Foo? = Foo(rawValue: 22)
1111

1212
enum Bar : Double {
13-
case A, B, C
13+
case a, b, c
1414
}
1515

1616
func localEnum() -> Int {
1717
enum LocalEnum : Int {
18-
case A, B, C
18+
case a, b, c
1919
}
20-
return LocalEnum.A.rawValue
20+
return LocalEnum.a.rawValue
2121
}
2222

2323
enum MembersReferenceRawType : Int {
24-
case A, B, C
24+
case a, b, c
2525

2626
init?(rawValue: Int) {
2727
self = MembersReferenceRawType(rawValue: rawValue)!
@@ -40,16 +40,16 @@ func deserialize<T : RawRepresentable>(_ serialized: [T.RawValue]) -> [T] {
4040
return serialized.map { T(rawValue: $0)! }
4141
}
4242

43-
var ints: [Int] = serialize([Foo.A, .B, .C])
44-
var doubles: [Double] = serialize([Bar.A, .B, .C])
43+
var ints: [Int] = serialize([Foo.a, .b, .c])
44+
var doubles: [Double] = serialize([Bar.a, .b, .c])
4545

4646
var foos: [Foo] = deserialize([1, 2, 3])
4747
var bars: [Bar] = deserialize([1.2, 3.4, 5.6])
4848

4949
// Infer RawValue from witnesses.
5050
enum Color : Int, RawRepresentable {
51-
case Red
52-
case Blue
51+
case red
52+
case blue
5353

5454
init?(rawValue: Double) {
5555
return nil

test/Sema/enum_raw_representable_multi_file.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -parse -verify -primary-file %s %S/Inputs/enum_multi_file_helper.swift
22

3-
var raw1: Int = Foo.A.rawValue
3+
var raw1: Int = Foo.a.rawValue
44
var raw2: Bar.RawValue = 0
55
var cooked1: Foo? = Foo(rawValue: raw1)
66
var cooked2: Bar? = Bar(rawValue: 22)

0 commit comments

Comments
 (0)