| Index: test/rules/always_specify_types.dart
|
| diff --git a/test/rules/always_specify_types.dart b/test/rules/always_specify_types.dart
|
| index eacb21763ed3780ed1e336e87ff882e7e2922697..ae068ee749c28f8e673d9aef77de77e31416fa04 100644
|
| --- a/test/rules/always_specify_types.dart
|
| +++ b/test/rules/always_specify_types.dart
|
| @@ -2,6 +2,20 @@
|
| // 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.
|
|
|
| +
|
| +// Hack to work around issues importing `meta.dart` in tests.
|
| +// Ideally, remove:
|
| +library meta;
|
| +
|
| +class _OptionalTypeArgs {
|
| + const _OptionalTypeArgs();
|
| +}
|
| +
|
| +const _OptionalTypeArgs optionalTypeArgs = const _OptionalTypeArgs();
|
| +
|
| +// ... and replace w/:
|
| +// import 'package:meta/meta.dart';
|
| +
|
| List list; // LINT
|
| List<List> lists; //LINT
|
| List<int> ints; //OK
|
| @@ -17,6 +31,9 @@ c(int x) {}
|
| d(final x) {} //LINT
|
| e(final int x) {}
|
|
|
| +@optionalTypeArgs
|
| +class P<T> { }
|
| +
|
| main() {
|
| var x = ''; //LINT [3:3]
|
| for (var i = 0; i < 10; ++i) { //LINT [8:3]
|
| @@ -42,6 +59,13 @@ main() {
|
| listen((_) { // OK!
|
| // ...
|
| });
|
| +
|
| + P p = new P(); //OK (optionalTypeArgs)
|
| +}
|
| +
|
| +P doSomething(P p) //OK (optionalTypeArgs)
|
| +{
|
| + return p;
|
| }
|
|
|
| listen(void onData(Object event)) {}
|
|
|