Mostly LG.
http://gwt-code-reviews.appspot.com/1286801/diff/1/3 File dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java (right): http://gwt-code-reviews.appspot.com/1286801/diff/1/3#newcode130 dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java:130: String body = stmts.toString(); This is problematic, you need to ultimately call JsNode.toSource() rather than toString(). http://gwt-code-reviews.appspot.com/1286801/diff/1/3#newcode140 dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java:140: int index = newCases.indexOf(previousCase); Comment this as a known linear search. http://gwt-code-reviews.appspot.com/1286801/diff/1/3#newcode168 dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java:168: private boolean cannotFallThrough(JsStatement stmt) { Did you look at JsStatement.unconditionalControlBreak()? In fact, if you implement JsBlock.unconditionalControlBreak() correctly, you could probably get rid of all this code. http://gwt-code-reviews.appspot.com/1286801/diff/1/4 File dev/core/test/com/google/gwt/dev/js/JsDuplicateCaseFolderTest.java (right): http://gwt-code-reviews.appspot.com/1286801/diff/1/4#newcode76 dev/core/test/com/google/gwt/dev/js/JsDuplicateCaseFolderTest.java:76: assertEquals(expected, output); You can be a lot looser on the syntax if you parse "expected". Easiest way to do that would be to call super.optimize(expected) or use a helper. http://gwt-code-reviews.appspot.com/1286801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
