ee9dba1217
NNBD spec states expanding the length of a list of non-nullable elements should produce a runtime error. https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/feature-specification.md#core-library-changes Add private method `_setLengthUnsafe()` as a replacement for the existing length setter to call internally when it is known to be safe that skips the checks. This breaks the corelib/list_test but it needs to be rewritten pending a decision regarding the `ListMixin` implementation. See: https://github.com/dart-lang/sdk/issues/42496 Issue: https://github.com/dart-lang/sdk/issues/39777 Change-Id: I081451227b332b68bb75bf08f3268e360bae090c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152423 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Stephen Adams <sra@google.com>