dart-sdk/sdk_nnbd
Alexander Markov c798bd8e53 [vm/nnbd] Fix element type nullability check in _GrowableList.length=
When growing an array, we're checking if element type is nullable.
The problem is that 'null is! T' is true for legacy types T
(other than top types and Null), so it throws for List<int*>.

In order to be able to grow arrays with all element types which can
hold null (including legacy element types) this test is changed to

      null as T;

which throws type error if T cannot hold null.

Change-Id: Icf0a397109945b049b4aaead4c7eab11d903c45b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134790
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-07 17:32:24 +00:00
..
bin dart2js nnbd setup 2020-01-21 06:22:51 +00:00
lib [vm/nnbd] Fix element type nullability check in _GrowableList.length= 2020-02-07 17:32:24 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn Fixes failure of x86_64 builds for android 2020-01-27 14:21:26 +00:00