Skip to content

Instantly share code, notes, and snippets.

@hawkw
Created December 23, 2014 17:46
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 hawkw/612cfd067ae86f7b99fb to your computer and use it in GitHub Desktop.
Save hawkw/612cfd067ae86f7b99fb to your computer and use it in GitHub Desktop.
Probably the single wordiest `for` comprehension I have ever written
for {
thing <- classState.table.keys.toList if thing != "this"
inherited <- classState.parent.get.table.get(thing) if !classState.table.get(thing).get.matches(inherited)
} yield {
new SemanticException(s"*** Method '$thing' must match inherited type signature",classState.table.get(thing).get.where)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment