From 3f05b8f2657832cde21c27c94219319619126347 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Fri, 26 Apr 2024 11:55:49 -0500 Subject: [PATCH] Add TODO for "this" issue --- .../src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java b/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java index 77aceb69bf..bf6a86b5ff 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java @@ -1652,6 +1652,8 @@ public JsNode transformSwitchExpression(JSwitchExpression x) { // to maintain a stack of nested JsFunctions (in case of nested switch expressions), and // potentially lets the compiler reuse locals. JsScope scope = getJsFunctionFor(currentMethod).getScope(); + + // TODO we must bind(this) or .apply(this), or use an arrow expression instead JsFunction wrapper = new JsFunction(info, scope); // Write out the switch expression as if it was a statement - every case must have returns