Index: packages/quiver/lib/testing/src/runtime/checked_mode.dart |
diff --git a/packages/quiver/lib/testing/src/runtime/checked_mode.dart b/packages/quiver/lib/testing/src/runtime/checked_mode.dart |
index 05dfaaedac445403b631526fb4b730bbcbcc2ce4..63735f7e74cbbc4efc1f5886b6c091fb8f2be930 100644 |
--- a/packages/quiver/lib/testing/src/runtime/checked_mode.dart |
+++ b/packages/quiver/lib/testing/src/runtime/checked_mode.dart |
@@ -14,11 +14,9 @@ |
part of quiver.testing.runtime; |
-/** |
- * Asserts that the current runtime has checked mode enabled. |
- * |
- * Otherwise, throws [StateError]. |
- */ |
+/// Asserts that the current runtime has checked mode enabled. |
+/// |
+/// Otherwise, throws [StateError]. |
void assertCheckedMode() { |
if (_isCheckedMode == null) _isCheckedMode = _checkForCheckedMode(); |
@@ -33,10 +31,12 @@ bool _checkForCheckedMode() { |
Object sentinal = new Object(); |
try { |
var i = 1 as dynamic; |
- String string = i; |
+ _takeString(i); |
throw sentinal; |
} catch (e) { |
if (e == sentinal) return false; |
} |
return true; |
} |
+ |
+void _takeString(String value) {} |