Created
November 6, 2010 22:46
-
-
Save olsonjeffery/665781 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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() | |
} |
This file contains hidden or 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
$ 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