Skip to content

Conversation

@echo094
Copy link
Contributor

@echo094 echo094 commented Jan 25, 2025

If there are function declarations, other expressions can be deleted safely.

function fun2(f) {
  return 1;
  function m() {
  }
  return 2
}

As explained in #224, the next siblings in the parents can be deleted safely (except the function declarations):

let x3 = 1;
function fun3(f) {
  {
    let x3 = f + 2;
    return x3 * 2;
  }
  return 3;
}
fun3(x3)

… and enhancements

Signed-off-by: echo094 <20028238+echo094@users.noreply.github.com>
@echo094 echo094 marked this pull request as ready for review January 25, 2025 19:32
@coderaiser coderaiser merged commit 8698589 into coderaiser:master Jan 25, 2025
8 checks passed
@coderaiser
Copy link
Owner

Nice! Thank you!

@echo094 echo094 deleted the remove-unreachable-code branch February 2, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants