Bug 186888

Summary: Incorrect scoping in module script
Product: WebKit Reporter: Jake Archibald <jaffathecake>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: fabianebert.com, mathias, ysuzuki
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

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 ***