Skip to content

Commit cbf75d2

Browse files
munificentjakemac53
authored andcommitted
Fix fuzzy arrow warning in lib/testing.dart. (dart-archive/bazel_worker#12)
Context: dart-lang/sdk#29630 - fixes a few places to use the real generic method syntax - bumps version to 0.1.5
1 parent 98bf2b7 commit cbf75d2

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

pkgs/bazel_worker/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.1.5
2+
3+
* Change TestStdinAsync.controller to StreamController<List<int>> (instead of
4+
using dynamic as the type argument).
5+
16
## 0.1.4
27

38
* Added `BazelWorkerDriver` class, which can be used to implement the bazel side

pkgs/bazel_worker/lib/testing.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class TestStdinSync implements TestStdin {
5050
/// Note: You must call [close] in order for the loop to exit properly.
5151
class TestStdinAsync implements TestStdin {
5252
/// Controls the stream for async delivery of bytes.
53-
final StreamController _controller = new StreamController();
54-
StreamController get controller => _controller;
53+
final StreamController<List<int>> _controller = new StreamController();
54+
StreamController<List<int>> get controller => _controller;
5555

5656
/// Adds all the [bytes] to this stream.
5757
void addInputBytes(List<int> bytes) {
@@ -67,9 +67,7 @@ class TestStdinAsync implements TestStdin {
6767
StreamSubscription<List<int>> listen(onData(List<int> bytes),
6868
{Function onError, void onDone(), bool cancelOnError}) {
6969
return _controller.stream.listen(onData,
70-
onError: onError,
71-
onDone: onDone,
72-
cancelOnError: cancelOnError) as StreamSubscription<List<int>>;
70+
onError: onError, onDone: onDone, cancelOnError: cancelOnError);
7371
}
7472

7573
@override

pkgs/bazel_worker/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: bazel_worker
2-
version: 0.1.4
2+
version: 0.1.5
33
description: Tools for creating a bazel persistent worker.
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/bazel_worker

pkgs/bazel_worker/test/worker_loop_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ void main() {
4848
});
4949
}
5050

51-
void runTests/*<T extends TestWorkerConnection>*/(
51+
void runTests<T extends TestWorkerConnection>(
5252
TestStdin stdinFactory(),
53-
/*=T*/ workerConnectionFactory(Stdin stdin, Stdout stdout),
54-
TestWorkerLoop workerLoopFactory(/*=T*/ connection)) {
53+
T workerConnectionFactory(Stdin stdin, Stdout stdout),
54+
TestWorkerLoop workerLoopFactory(T connection)) {
5555
TestStdin stdinStream;
5656
TestStdoutStream stdoutStream;
57-
var/*=T*/ connection;
57+
T connection;
5858
TestWorkerLoop workerLoop;
5959

6060
setUp(() {

0 commit comments

Comments
 (0)