Bug 186888 - Incorrect scoping in module script
Summary: Incorrect scoping in module script
Status: RESOLVED DUPLICATE of bug 193347
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-21 04:34 PDT by Jake Archibald
Modified: 2020-04-29 16:17 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Archibald 2018-06-21 04:34:22 PDT
http://jsbin.com/buxogoz/edit?html,console

  <script>
    const foo = 'bar';
  </script>
  <script>
    console.log(foo);
  </script>
  <script type="module">
    console.log(foo);
  </script>

"bar" should be logged twice, but Safari throws on the second log as it can't find "foo".
Comment 1 Fabian 2020-02-25 01:42:05 PST
Any updates on this bug?
Comment 2 Yusuke Suzuki 2020-04-29 16:17:29 PDT
Fixed in bug 193347

*** This bug has been marked as a duplicate of bug 193347 ***