Index: tools/migration/lib/src/validate.dart |
diff --git a/tools/migration/lib/src/validate.dart b/tools/migration/lib/src/validate.dart |
index 5dbbeaaabd9188537d0d0a2441f0ca7297c73efe..c91547ee8b9e61a2f75e9bffd32da79537c312a2 100644 |
--- a/tools/migration/lib/src/validate.dart |
+++ b/tools/migration/lib/src/validate.dart |
@@ -9,6 +9,8 @@ final _checkedPattern = new RegExp(r"\bchecked\b"); |
final _abstractErrorPattern = |
new RegExp(r"\bAbstractClassInstantiationError\b"); |
final _typeErrorPattern = new RegExp(r"\bTypeError\b"); |
+final _typeAssertionsEnabledPattern = new RegExp(r"\btypeAssertionsEnabled\b"); |
+final _checkedModeEnabledPattern = new RegExp(r"\bcheckedModeEnabled\b"); |
void validateFile(String path, String source, [List<String> todos]) { |
check(Pattern pattern, String noteMessage, String todo) { |
@@ -24,4 +26,8 @@ void validateFile(String path, String source, [List<String> todos]) { |
"Remove code that checks for AbstractClassInstantiationError."); |
check(_typeErrorPattern, 'mentions "TypeError"', |
"Ensure code that checks for a TypeError uses 2.0 semantics."); |
+ check(_typeAssertionsEnabledPattern, 'mentions "typeAssertionsEnabled"', |
+ "Remove checks for typeAssertionsEnabled, they are always enabled in 2.0."); |
+ check(_checkedModeEnabledPattern, 'mentions "typeAssertionsEnabled"', |
+ "Remove checks for checkedModeEnabled, it is always enabled in 2.0."); |
} |