Skip to content

if_return - deopt when ref loses scope - #408

Merged
boopathi merged 3 commits into
masterfrom
if-return-1
Feb 27, 2017
Merged

boopathi merged 3 commits into
masterfrom
if-return-1

Conversation

@boopathi

@boopathi boopathi commented Feb 8, 2017 •

Copy link
Copy Markdown
Member

Adds a temporary fix for #420 - binding not found when the path is a variableDeclaration.

@boopathi boopathi added the Tag: Bug Fix Pull Request fixes a bug label Feb 8, 2017
@boopathi

boopathi commented Feb 8, 2017

Copy link
Copy Markdown
Member Author

The test fails because of padding issue.

@boopathi boopathi mentioned this pull request Feb 11, 2017
@boopathi

boopathi commented Feb 18, 2017 •

Copy link
Copy Markdown
Member Author

The diff for breaking test cases -

# test1
@@ -1,6 +1,6 @@
  function x() {
    if (bar) {
-    var x = foo;
-    if (foo && y) throw y;
-  }
+      var x = foo;
+      if (foo && y) throw y;
+    }
  }

# test 2
@@ -2,8 +2,8 @@
    function bar() {
      baz(), bar();
    }

    if (bar(), !x) {
-    const { a } = b;
-  }
+      const { a } = b;
+    }
  }

@boopathi
boopathi merged commit 4ef735e into master Feb 27, 2017
@boopathi
boopathi deleted the if-return-1 branch February 27, 2017 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tag: Bug Fix Pull Request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If..return removes something it shouldn't

1 participant