Skip to content

Commit

Permalink
tidying (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
pq committed Nov 5, 2019
1 parent d863abf commit ddc7376
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test/_data/close_sinks/src/a.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';
// ignore_for_file: prefer_initializing_formals
// ignore_for_file: unnecessary_new
// ignore_for_file: unnecessary_this
// ignore_for_file: unused_field
// ignore_for_file: unused_local_variable
// ignore_for_file: use_setters_to_change_properties

import 'dart:async';
import 'dart:io';

class MockIOSink implements Sink {
@override
Expand All @@ -20,14 +27,14 @@ void inScope() {

class A {
IOSink _sinkA; // LINT
void init(filename) {
void init(String filename) {
_sinkA = new File(filename).openWrite();
}
}

class B {
IOSink _sinkB;
void init(filename) {
void init(String filename) {
_sinkB = new File(filename).openWrite(); // OK
}

Expand All @@ -38,11 +45,11 @@ class B {

class B1 {
Socket _socketB1;
Future init(filename) async {
Future init(String filename) async {
_socketB1 = await Socket.connect(null /*address*/, 1234); // OK
}

void dispose(filename) {
void dispose(String filename) {
_socketB1.destroy();
}
}
Expand Down Expand Up @@ -79,7 +86,7 @@ class C3 {
}

class D {
IOSink init(filename) {
IOSink init(String filename) {
IOSink _sinkF = new File(filename).openWrite(); // OK
return _sinkF;
}
Expand Down Expand Up @@ -136,4 +143,4 @@ class CascadeSink {
..add(null)
..close();
}
}
}

0 comments on commit ddc7376

Please sign in to comment.