Index: pkg/compiler/lib/src/helpers/debug_collection.dart |
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart |
index 74a3d2ec34ef7e079c8d04c83b996aafaa3c4a4f..c0276cf200f5188398451337083d8e6ba422d5f7 100644 |
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart |
+++ b/pkg/compiler/lib/src/helpers/debug_collection.dart |
@@ -2,7 +2,6 @@ |
// 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. |
- |
typedef void DebugCallback(String methodName, var arg1, var arg2); |
class DebugMap<K, V> implements Map<K, V> { |
@@ -84,8 +83,8 @@ class DebugIterable<E> implements Iterable<E> { |
E reduce(E combine(E value, E element)) => iterable.reduce(combine); |
- dynamic fold(var initialValue, |
- dynamic combine(var previousValue, E element)) { |
+ dynamic fold( |
+ var initialValue, dynamic combine(var previousValue, E element)) { |
return iterable.fold(initialValue, combine); |
} |
@@ -95,7 +94,7 @@ class DebugIterable<E> implements Iterable<E> { |
bool any(bool test(E element)) => iterable.any(test); |
- List<E> toList({ bool growable: true }) { |
+ List<E> toList({bool growable: true}) { |
return iterable.toList(growable: growable); |
} |
@@ -121,7 +120,7 @@ class DebugIterable<E> implements Iterable<E> { |
E get single => iterable.single; |
- E firstWhere(bool test(E element), { E orElse() }) { |
+ E firstWhere(bool test(E element), {E orElse()}) { |
return iterable.firstWhere(test, orElse: orElse); |
} |
@@ -132,7 +131,6 @@ class DebugIterable<E> implements Iterable<E> { |
E singleWhere(bool test(E element)) => iterable.singleWhere(test); |
E elementAt(int index) => iterable.elementAt(index); |
- |
} |
class DebugList<E> extends DebugIterable<E> implements List<E> { |
@@ -268,11 +266,11 @@ class DebugSet<E> extends DebugIterable<E> implements Set<E> { |
/// at the call site by running test programs and adding to [runtimeTypes] when |
/// new type are found. |
void assertType(String name, List<String> runtimeTypes, var object, |
- {bool showObjects: false}) { |
+ {bool showObjects: false}) { |
String runtimeType = '${object.runtimeType}'; |
if (runtimeTypes != null && runtimeTypes.contains(runtimeType)) return; |
throw '$name: $runtimeType' |
- '${showObjects ? ' ($object)' : ''}'; |
+ '${showObjects ? ' ($object)' : ''}'; |
} |
/// Callback for the [addCallback] of [DebugMap] that throws an exception if |
@@ -287,7 +285,7 @@ class MapTypeAsserter { |
final bool showObjects; |
const MapTypeAsserter(this.name, this.runtimeTypes, |
- {bool this.showObjects: false}); |
+ {bool this.showObjects: false}); |
void call(String methodName, var key, var value) { |
check(key, value, '$methodName: '); |
@@ -299,7 +297,7 @@ class MapTypeAsserter { |
List<String> valuesTypes = runtimeTypes[keyType]; |
if (valuesTypes != null && valuesTypes.contains(valueType)) return; |
throw '$name: $text$keyType => $valueType' |
- '${showObjects ? ' ($key => $value)' : ''}'; |
+ '${showObjects ? ' ($key => $value)' : ''}'; |
} |
} |
@@ -315,7 +313,7 @@ class CollectionTypeAsserter { |
final bool showObjects; |
const CollectionTypeAsserter(this.name, this.runtimeTypes, |
- {bool this.showObjects: false}); |
+ {bool this.showObjects: false}); |
void call(String methodName, var element, _) { |
check(element, '$methodName: '); |
@@ -325,6 +323,6 @@ class CollectionTypeAsserter { |
String elementType = '${element.runtimeType}'; |
if (runtimeTypes.contains(elementType)) return; |
throw '$name: $text$elementType' |
- '${showObjects ? ' ($element)' : ''}'; |
+ '${showObjects ? ' ($element)' : ''}'; |
} |
} |