You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basic tests and inline source maps when native source maps are enabled
- Added check to not patch `Error.prepareStackTrace` if it has already been patched by another library. - Always attach inline source maps if `--enable-source-map` is set. - Added some basic tests for stack trace.
<spanclass="comment"># Throws a TypeError at runtime</span>
5369
5369
</code></pre>
5370
5370
</blockquote><p>ES2015 classes don’t allow bound (fat arrow) methods. The CoffeeScript compiler goes through some contortions to preserve support for them, but one thing that can’t be accommodated is calling a bound method before it is bound:</p>
<spanclass="keyword">new</span> Namespace.Klass <spanclass="comment"># Throws a TypeError at runtime</span>
5385
5385
</code></pre>
5386
5386
</blockquote><p>Due to the hoisting required to compile to ES2015 classes, dynamic keys in class methods can’t use values from the executable class body unless the methods are assigned in prototype style.</p>
name = <spanclass="string">'method'</span>
5389
5389
<spanclass="string">"<spanclass="subst">#{name}</span>"</span>: <spanclass="function">-></span><spanclass="comment"># This method will be named 'undefined'</span>
5390
5390
@::[name] = <spanclass="function">-></span><spanclass="comment"># This will work; assigns to `A.prototype.method`</span>
@@ -5394,11 +5394,11 @@ <h3>Classes are compiled to ES2015 classes</h3>
5394
5394
<sectionid="breaking-changes-super-this">
5395
5395
<h3><code>super</code> and <code>this</code></h3>
5396
5396
<p>In the constructor of a derived class (a class that <code>extends</code> another class), <code>this</code> cannot be used before calling <code>super</code>:</p>
constructor: <spanclass="function">-></span> this <spanclass="comment"># Throws a compiler error</span>
5399
5399
</code></pre>
5400
5400
</blockquote><p>This also means you cannot pass a reference to <code>this</code> as an argument to <code>super</code> in the constructor of a derived class:</p>
super @arg <spanclass="comment"># Throws a compiler error</span>
5404
5404
</code></pre>
@@ -5447,7 +5447,7 @@ <h3><code>super</code> and <code>this</code></h3>
5447
5447
<sectionid="breaking-changes-super-extends">
5448
5448
<h3><code>super</code> and <code>extends</code></h3>
5449
5449
<p>Due to a syntax clash with <code>super</code> with accessors, “bare” <code>super</code> (the keyword <code>super</code> without parentheses) no longer compiles to a super call forwarding all arguments.</p>
0 commit comments