diff options
Diffstat (limited to 'test/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java')
| -rw-r--r-- | test/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java b/test/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java new file mode 100644 index 0000000..255434d --- /dev/null +++ b/test/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2015 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Lesser General Public | ||
| 5 | * License v3.0 which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/lgpl.html | ||
| 7 | * | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.inputs.innerClasses; | ||
| 12 | |||
| 13 | public class E_AnonymousWithOuterAccess { | ||
| 14 | |||
| 15 | // reproduction of error case documented at: | ||
| 16 | // https://bitbucket.org/cuchaz/enigma/issue/61/stackoverflowerror-when-deobfuscating | ||
| 17 | |||
| 18 | public Object makeInner() { | ||
| 19 | outerMethod(); | ||
| 20 | return new Object() { | ||
| 21 | @Override | ||
| 22 | public String toString() { | ||
| 23 | return outerMethod(); | ||
| 24 | } | ||
| 25 | }; | ||
| 26 | } | ||
| 27 | |||
| 28 | private String outerMethod() { | ||
| 29 | return "foo"; | ||
| 30 | } | ||
| 31 | } | ||