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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = ""; 7 const DONT_KNOW_HOW_TO_FIX = "";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 "promotion and potentially mutated in the scope of '#{variableName}'."); 1387 "promotion and potentially mutated in the scope of '#{variableName}'.");
1388 1388
1389 static const MessageKind ACCESSED_IN_CLOSURE_HERE = const MessageKind( 1389 static const MessageKind ACCESSED_IN_CLOSURE_HERE = const MessageKind(
1390 "Info: Variable '#{variableName}' is accessed in a closure here."); 1390 "Info: Variable '#{variableName}' is accessed in a closure here.");
1391 1391
1392 static const MessageKind NOT_MORE_SPECIFIC = const MessageKind( 1392 static const MessageKind NOT_MORE_SPECIFIC = const MessageKind(
1393 "Hint: Variable '#{variableName}' is not shown to have type " 1393 "Hint: Variable '#{variableName}' is not shown to have type "
1394 "'#{shownType}' because '#{shownType}' is not more specific than the " 1394 "'#{shownType}' because '#{shownType}' is not more specific than the "
1395 "known type '#{knownType}' of '#{variableName}'."); 1395 "known type '#{knownType}' of '#{variableName}'.");
1396 1396
1397 static const MessageKind NOT_MORE_SPECIFIC_SUBTYPE = const MessageKind(
1398 "Hint: Variable '#{variableName}' is not shown to have type "
1399 "'#{shownType}' because '#{shownType}' is not a subtype of the "
1400 "known type '#{knownType}' of '#{variableName}'.");
1401
1402 static const MessageKind NOT_MORE_SPECIFIC_SUGGESTION = const MessageKind(
1403 "Hint: Variable '#{variableName}' is not shown to have type "
1404 "'#{shownType}' because '#{shownType}' is not more specific than the "
1405 "known type '#{knownType}' of '#{variableName}'.",
1406 howToFix: "Try replacing '#{shownType}' with '#{shownTypeSuggestion}'.");
1407
1397 ////////////////////////////////////////////////////////////////////////////// 1408 //////////////////////////////////////////////////////////////////////////////
1398 // Patch errors start. 1409 // Patch errors start.
1399 ////////////////////////////////////////////////////////////////////////////// 1410 //////////////////////////////////////////////////////////////////////////////
1400 1411
1401 static const MessageKind PATCH_RETURN_TYPE_MISMATCH = const MessageKind( 1412 static const MessageKind PATCH_RETURN_TYPE_MISMATCH = const MessageKind(
1402 "Error: Patch return type '#{patchReturnType}' does not match " 1413 "Error: Patch return type '#{patchReturnType}' does not match "
1403 "'#{originReturnType}' on origin method '#{methodName}'."); 1414 "'#{originReturnType}' on origin method '#{methodName}'.");
1404 1415
1405 static const MessageKind PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH = 1416 static const MessageKind PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH =
1406 const MessageKind( 1417 const MessageKind(
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 1585
1575 class CompileTimeConstantError extends Diagnostic { 1586 class CompileTimeConstantError extends Diagnostic {
1576 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) 1587 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse)
1577 : super(kind, arguments, terse); 1588 : super(kind, arguments, terse);
1578 } 1589 }
1579 1590
1580 class CompilationError extends Diagnostic { 1591 class CompilationError extends Diagnostic {
1581 CompilationError(MessageKind kind, Map arguments, bool terse) 1592 CompilationError(MessageKind kind, Map arguments, bool terse)
1582 : super(kind, arguments, terse); 1593 : super(kind, arguments, terse);
1583 } 1594 }
OLDNEW
« 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