File: embedded-diff.comment

package info (click to toggle)
whatthepatch 1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 576 kB
  • sloc: python: 2,395; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 832 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
In order to pass the initial test case of the bug reporter, a simple patch for "IRFactory#decompile(AstNode)" is necessary:
---
--- a/src/org/mozilla/javascript/IRFactory.java
+++ b/src/org/mozilla/javascript/IRFactory.java
@@ -2182,6 +2182,9 @@ public final class IRFactory extends Parser
           case Token.GETELEM:
               decompileElementGet((ElementGet) node);
               break;
+          case Token.THIS:
+              decompiler.addToken(node.getType());
+              break;
           default:
               Kit.codeBug("unexpected token: "
                           + Token.typeToName(node.getType()));
---

But that change won't be sufficient to cover the other tests of the JUnit test case.

PS: The bug subject should be changed to mention "Destructuring Assignment" instead of "Array comprehension"