# HG changeset patch # User attila # Date 1401893570 -7200 # Node ID 00f645e2d28a745f560839bb1c3d95725bd430ee # Parent 747cf25884d6e05e1e2ab88a386a2988a0e5000d 8044803: Unnecessary restOf check Reviewed-by: hannesw, jlaskey diff -r 747cf25884d6 -r 00f645e2d28a nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Wed Jun 04 19:01:24 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Wed Jun 04 16:52:50 2014 +0200 @@ -2423,7 +2423,7 @@ } assert undefinedSymbol != null; //remove warning - if (undefinedSymbol == null || !undefinedSymbol.isScope()) { + if (!undefinedSymbol.isScope()) { return false; //disallow undefined as local var or parameter } @@ -2440,11 +2440,6 @@ return false; } - // TODO: why? - if (isRestOf()) { - return false; - } - //make sure that undefined has not been overridden or scoped as a local var //between us and global if (!compiler.isGlobalSymbol(lc.getCurrentFunction(), "undefined")) {