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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 1363993004: Report info messages together with their error, warning, or hint. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/mirrors_used.dart ('k') | pkg/compiler/lib/src/ordered_typeset.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 23bf702b96a4a24c35632956dd35d8ce2084d7ec..dfb2c600e3ba7087dab8a2a88a2204bb24917a08 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -214,7 +214,8 @@ class NativeBehavior {
void reportError(String message) {
seenError = true;
- listener.reportError(spannable, MessageKind.GENERIC, {'text': message});
+ listener.reportErrorMessage(
+ spannable, MessageKind.GENERIC, {'text': message});
}
const List<String> knownTags = const [
@@ -434,21 +435,25 @@ class NativeBehavior {
var argNodes = jsCall.arguments;
if (argNodes.isEmpty || argNodes.tail.isEmpty) {
- compiler.reportError(jsCall, MessageKind.GENERIC,
+ compiler.reportErrorMessage(
+ jsCall,
+ MessageKind.GENERIC,
{'text': "JS expression takes two or more arguments."});
return behavior;
}
var specArgument = argNodes.head;
if (specArgument is !StringNode || specArgument.isInterpolation) {
- compiler.reportError(specArgument, MessageKind.GENERIC,
+ compiler.reportErrorMessage(
+ specArgument, MessageKind.GENERIC,
{'text': "JS first argument must be a string literal."});
return behavior;
}
var codeArgument = argNodes.tail.head;
if (codeArgument is !StringNode || codeArgument.isInterpolation) {
- compiler.reportError(codeArgument, MessageKind.GENERIC,
+ compiler.reportErrorMessage(
+ codeArgument, MessageKind.GENERIC,
{'text': "JS second argument must be a string literal."});
return behavior;
}
@@ -753,7 +758,7 @@ class NativeBehavior {
int index = typeString.indexOf('<');
if (index < 1) {
- compiler.reportError(
+ compiler.reportErrorMessage(
_errorNode(locationNodeOrElement, compiler),
MessageKind.GENERIC,
{'text': "Type '$typeString' not found."});
@@ -764,7 +769,7 @@ class NativeBehavior {
// TODO(sra): Parse type parameters.
return type;
}
- compiler.reportError(
+ compiler.reportErrorMessage(
_errorNode(locationNodeOrElement, compiler),
MessageKind.GENERIC,
{'text': "Type '$typeString' not found."});
« no previous file with comments | « pkg/compiler/lib/src/mirrors_used.dart ('k') | pkg/compiler/lib/src/ordered_typeset.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698