Xcode 7.0 beta 3 does not require explicit raw value for String enums.

This commit is contained in:
Gwendal Roué committed 2015-07-09 08:17:35 +02:00
1 parent 4d5491e0c7
commit e761956782
4 files changed
+11 -11

No files matched your search

@@ -32,9 +32,9 @@ enum Color : Int {
}
enum Grape : String {
case Chardonnay = "Chardonnay"
case Merlot = "Merlot"
case Riesling = "Riesling"
case Chardonnay
case Merlot
case Riesling
}
extension Color : DatabaseIntRepresentable { }
+3 -3
View File
@@ -278,9 +278,9 @@ DatabaseValueConvertible adoption.
// A String enum:
enum Color : String {
case Red = "red"
case White = "white"
case Rose = "rose"
case Red
case White
case Rose
}
// Declare DatabaseIntRepresentable adoption:
+3 -3
View File
@@ -302,9 +302,9 @@ enum Color : Int {
}
enum Grape : String {
case Chardonnay = "Chardonnay"
case Merlot = "Merlot"
case Riesling = "Riesling"
case Chardonnay
case Merlot
case Riesling
}
```
+2 -2
View File
@@ -8,6 +8,6 @@
- [ ] Test for the item above
- [X] When one forgets to set the primaryKey in setDatabaseValue(_:column:), he has issues later deleting or updating. It's difficult to know why the delete fails.
- [ ] Test for the item above
- [ ] Beta 3: remove strings behind enum cases: "If an element of an enum with string raw type does not have an explicit raw value, it will default to the text of the enum’s name".
- [X] Beta 3: remove strings behind enum cases: "If an element of an enum with string raw type does not have an explicit raw value, it will default to the text of the enum’s name".
- [ ] Beta 3: leading dot is now possible: foo\n.bar\n.baz
- [ ] Beta 3: "Errors trapped by a try! expression, or unhandled at the top level of a script or playground, now display the error value in the trap message"
- [ ] Beta 3: "Errors trapped by a try! expression, or unhandled at the top level of a script or playground, now display the error value in the trap message". RowModelError are OK. Test DatabaseError.