__spreadArrays throws 'Cannot read property 'length' of null' when --strictNullChecks is off #33549
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
TypeScript Version: 3.6.3
Search Terms:
__spreadArrays, 3.6.3
Code
Make sure to run with
--strictNullChecks
off and compile for ES5!Expected behavior:
No error should be produced by this code.
Actual behavior:
Playground Link:
Error thrown in TS 3.6.3:
https://www.typescriptlang.org/play/?strictNullChecks=false&target=1#code/FAMwrgdgxgLglgewgAhAhAKARgLmRMAWywFMAnAbQF0BeAgG3oEoBvYZD5KJAZxmQCGNCgEYANACYxAOllYqAbnaduEHgnolp9BAHMMApkoC+wUOgxGgA
No error is thrown in TS 3.5.1:
https://www.typescriptlang.org/play/?strictNullChecks=false&target=1&ts=3.5.1#code/FAMwrgdgxgLglgewgAhAhAKARgLmRMAWywFMAnAbQF0BeAgG3oEoBvYZD5KJAZxmQCGNCgEYANACYxAOllYqAbnaduEHgnolp9BAHMMApkoC+wUOgxGgA
Related Issues:
none
The problem was probably introduced by this pull request: #31166
The text was updated successfully, but these errors were encountered: