Skip to content

When there is a var declaration inside a labeled statement block, it fails to workaround #2

Description

@itozyun

However, if var is hoisted by the Closure Compiler, the problem does not occur...

var is not hoisted to the nearest variable scope

if (zc = !Wc) {
  a: {
    for (var Ke in ed) {
      if (0 === Ke.indexOf("Moz")) {
        var id = !0; // <- var
        break a;
      }
    }
    id = void 0;
  }
  zc = !!id; // <- !!!
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions