<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Poor Error Message / Call Stack for TypeError: Cannot call a class constructor"
   href="https://bugs.webkit.org/show_bug.cgi?id=147656">147656</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Poor Error Message / Call Stack for TypeError: Cannot call a class constructor
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>joepeck&#64;webkit.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bburg&#64;apple.com, ggaren&#64;apple.com, rniwa&#64;webkit.org, saambarati1&#64;gmail.com, utatane.tea&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>* SUMMARY
Poor Error Message / Call Stack for TypeError: Cannot call a class constructor. It points to the &quot;constructor&quot; instead of the &quot;call&quot; site.

* TEST:

  1  &lt;script&gt;
  2  class MyClass {
  3      constructor() { this.name = &quot;name&quot;; }
  4  }
  5  function OtherClass() {
  6      MyClass.call(this);
  7  }
  8  x = new OtherClass;
  9  &lt;/script&gt;


* STEPS TO REPRODUCE
1. Run attached test case
  =&gt; Error in console points to the &quot;constructor&quot; line, expected it to point to the frame above, the &quot;call&quot; site.
  TypeError: Cannot call a class constructor
    MyClass test.html:3
    OtherClass test.html:6
    (anonymous function) test.html:8

* NOTES
- Inspector currently has an off by 1 error in its stack trace output which is getting corrected at the moment.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>