Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1541)

Unified Diff: lib/src/info.dart

Issue 1298893003: Enable is and as checks on non-ground types (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Minor fixes Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index 228a0fc426bad80ce68608c674090acdef16d013..8093026b665cd39a27dcfa3032431017d71d1d1a 100644
--- a/lib/src/info.dart
+++ b/lib/src/info.dart
@@ -464,15 +464,19 @@ class InvalidParameterDeclaration extends StaticError {
@override String get message => 'Type check failed: {0} is not of type {1}';
}
-class InvalidRuntimeCheckError extends StaticError {
+class NonGroundTypeCheckInfo extends StaticInfo {
final DartType type;
+ final AstNode node;
- InvalidRuntimeCheckError(AstNode node, this.type) : super(node) {
+ NonGroundTypeCheckInfo(this.node, this.type) {
assert(node is IsExpression || node is AsExpression);
}
@override List<Object> get arguments => [type];
- String get message => "Invalid runtime check on non-ground type {0}";
+ String get message =>
+ "Runtime check on non-ground type {0} may throw StrongModeError";
+
+ toErrorCode() => new HintCode(name, message);
}
// Invalid override of an instance member of a class.

Powered by Google App Engine
This is Rietveld 408576698