<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>187945</bug_id>
          
          <creation_ts>2018-07-24 00:54:10 -0700</creation_ts>
          <short_desc>Different output compared with other JS engines: can&apos;t find variable</short_desc>
          <delta_ts>2023-05-04 09:09:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>163209</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>sunlili</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>email</cc>
    
    <cc>fpizlo</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1444582</commentid>
    <comment_count>0</comment_count>
    <who name="">sunlili</who>
    <bug_when>2018-07-24 00:54:10 -0700</bug_when>
    <thetext>Hello,
    Running following js code:
-----------------------------------
let testCases = [                                                                                                              
  function() {
    return {
      start: 0,
      end: 100,
      test: function test() {
      }   
    };  
  },  
];
for(let testCase of testCases) {
  let testInfo = testCase();

  function run() {
      print(testInfo);
  }

  run();

}

print(&quot;BT_FLAG&quot;);
-----------------------------------

    Output of ch, v8 and firefox:
[object Object]
BT_FLAG

    However, output of jsc is:
Exception: ReferenceError: Can&apos;t find variable: testInfo


BT group
2018.7.24</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1455644</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-08-31 04:24:49 -0700</bug_when>
    <thetext>*** Bug 188784 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952753</commentid>
    <comment_count>2</comment_count>
    <who name="">email</who>
    <bug_when>2023-05-03 15:30:27 -0700</bug_when>
    <thetext>This bug makes ES6 code unusable if wrapped in a block, such as in Confluence Data Center plugins: https://community.developer.atlassian.com/t/resource-batching-breaks-closure-compiled-es6-code-in-safari/68909

&quot;Different output&quot; is a pretty severe understatement. &quot;Horribly incorrect output&quot; would be more accurate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952905</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-04 08:41:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/108894656&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952915</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2023-05-04 09:09:15 -0700</bug_when>
    <thetext>This is Annex B feature.

*** This bug has been marked as a duplicate of bug 163209 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>