Created
August 16, 2015 01:57
-
-
Save NachoSoto/c87b0dbb1662603fea0f to your computer and use it in GitHub Desktop.
This file contains 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 characters
enum A { | |
case A1 | |
} | |
enum B { | |
case B1 | |
var a: A { | |
return .A1 | |
} | |
} | |
enum C { | |
case C1 | |
} | |
struct S { | |
let a: A | |
let c: C | |
init(_ a: A, _ c: C) { | |
self.a = a | |
self.c = c | |
} | |
init(_ b: B, _ c: C) { | |
self.a = b.a | |
self.c = c | |
} | |
} | |
let s = S(B.B1, .C1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment