-
-
Save danielctull/f20fe5e1aaeaf6c08cd6 to your computer and use it in GitHub Desktop.
Revisions
-
PeteC revised this gist
Aug 27, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ enum AnotherEnum { } let anotherEnumValueA = AnotherEnum.StateA let anotherEnumValueB = AnotherEnum.StateB(1) if anotherEnumValueA == anotherEnumValueB { // Compiler error println("Same") -
PeteC created this gist
Aug 27, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ enum MyEnum { case StateA case StateB } let enumValueA = MyEnum.StateA let enumValueB = MyEnum.StateB if enumValueA == enumValueB { println("Same") } else { println("Different") } enum AnotherEnum { case StateA case StateB(Int) } let anotherEnumValueA = AnotherEnum.StateA let anotherEnumValueB = AnotherEnum.StateB if anotherEnumValueA == anotherEnumValueB { // Compiler error println("Same") } else { println("Different") }