Created
September 13, 2013 20:55
-
-
Save jesboat/6555926 to your computer and use it in GitHub Desktop.
Don't try this at home.
This file contains 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
public class Eep { | |
class Foo { | |
final int bar; | |
Foo() { | |
Eep.this.foo = this; | |
if (true) { | |
throw new RuntimeException("lolol"); | |
} | |
bar = 42; | |
} | |
} | |
Foo foo; | |
public static void main(String[] args) { | |
Eep e = new Eep(); | |
try { | |
e.new Foo(); | |
} catch (Exception x) { | |
/* lolol */; | |
} | |
System.out.println("You weren't expecting this, were you? " + e.foo.bar); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment