--- 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")) {