This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
12 lines
No EOL
622 B
Text
12 lines
No EOL
622 B
Text
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList10.ts(2,8): error TS2370: A rest parameter must be of an array type.
|
|
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList10.ts(2,11): error TS1048: A rest parameter cannot have an initializer.
|
|
|
|
|
|
==== tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList10.ts (2 errors) ====
|
|
class C {
|
|
foo(...bar = 0) { }
|
|
~~~~~~~~~~
|
|
!!! error TS2370: A rest parameter must be of an array type.
|
|
~~~
|
|
!!! error TS1048: A rest parameter cannot have an initializer.
|
|
} |