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

Unified Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 88483002: Compute suggestions for failed type promotions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years 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: sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index eeffacb071831cf14b7495b09fa6f10f2ca6e17a..c957de3426b04e66d0478966c0d10e0feaf57a30 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -1394,6 +1394,17 @@ Please include the following information:
"'#{shownType}' because '#{shownType}' is not more specific than the "
"known type '#{knownType}' of '#{variableName}'.");
+ static const MessageKind NOT_MORE_SPECIFIC_SUBTYPE = const MessageKind(
+ "Hint: Variable '#{variableName}' is not shown to have type "
+ "'#{shownType}' because '#{shownType}' is not a subtype of the "
+ "known type '#{knownType}' of '#{variableName}'.");
+
+ static const MessageKind NOT_MORE_SPECIFIC_SUGGESTION = const MessageKind(
+ "Hint: Variable '#{variableName}' is not shown to have type "
+ "'#{shownType}' because '#{shownType}' is not more specific than the "
+ "known type '#{knownType}' of '#{variableName}'.",
+ howToFix: "Try replacing '#{shownType}' with '#{shownTypeSuggestion}'.");
+
//////////////////////////////////////////////////////////////////////////////
// Patch errors start.
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/typechecker.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698