Files
sdk/runtime/lib
Todd Volkert 9173aed1ba Declare return types of Uint8List.
These methods all were returning Uint8List, yet they were only
declared to return List<int>. This forced callers to either defensively
wrap the return values in Uint8List, or to assume the contravariant
return value:

* Utf8Codec.encode()
* BytesBuilder.takeBytes()
* BytesBuilder.toBytes()
* File.readAsBytes()
* File.readAsBytesSync()
* RandomAccessFile.read()
* RandomAccessFile.readSync()
* Uint8List.sublist()

Since it's related, this change also updates the following sublist()
methods to declare that they return the a sublist of the same type as
the source list:

* Int8List
* Uint8ClampedList
* Int16List
* Uint16List
* Int32List
* Uint32List
* Int64List
* Uint64List
* Float32List
* Float64List
* Float32x4List
* Int32x4List
* Float64x2List

Bug: https://github.com/dart-lang/sdk/issues/36900
Bug: https://github.com/dart-lang/sdk/issues/31547
Bug: https://github.com/dart-lang/sdk/issues/27818
Bug: https://github.com/dart-lang/sdk/issues/35521
Change-Id: Ic3bc1db0d64de36fb68b1d8d98037eed1464f978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101742
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-20 06:43:44 +00:00
..
2018-11-15 19:08:09 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00
2019-06-13 16:26:40 +00:00
2019-06-13 16:26:40 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00
2019-05-21 17:01:48 +00:00