Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Created November 6, 2010 22:46
Show Gist options
  • Save olsonjeffery/665781 to your computer and use it in GitHub Desktop.
Save olsonjeffery/665781 to your computer and use it in GitHub Desktop.
Blah: class {
bar: Func
baz: Func
foo: func() {
derp: String
this bar = func {
derp = "derp"
}
this baz = func {
(derp + (" herp")) println() // segfault
}
}
}
main: func {
b := Blah new()
b foo()
b bar()
b baz()
}
$ rock closure_capture.ooc
$ ./closure_capture
Segmentation fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment