Skip to content

Instantly share code, notes, and snippets.

@sisoje
Last active February 7, 2019 11:42
Show Gist options
  • Save sisoje/480e95964932cfce86be9331a999068b to your computer and use it in GitHub Desktop.
Save sisoje/480e95964932cfce86be9331a999068b to your computer and use it in GitHub Desktop.
// compiles:
let goodKeyPath1: KeyPath<Person, String> = \Person.name
let goodKeyPath2: KeyPath<Person, Int> = \Person.age
// doesn't compile:
let badKeyPath = \Person.password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment