Skip to content

Instantly share code, notes, and snippets.

@NachoSoto
Created August 16, 2015 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NachoSoto/c87b0dbb1662603fea0f to your computer and use it in GitHub Desktop.
Save NachoSoto/c87b0dbb1662603fea0f to your computer and use it in GitHub Desktop.
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