TypeScript/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt

11 lines
484 B
Plaintext
Raw Normal View History

tests/cases/compiler/optionalParamReferencingOtherParams2.ts(2,29): error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/optionalParamReferencingOtherParams2.ts (1 errors) ====
var a = 1;
function strange(x = a, y = b) {
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it.
2014-07-13 01:04:16 +02:00
var b = "";
return y;
}