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

Unified Diff: pkg/compiler/lib/src/warnings.dart

Issue 746993002: Avoid patching in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month 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/resolution/members.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/warnings.dart
diff --git a/pkg/compiler/lib/src/warnings.dart b/pkg/compiler/lib/src/warnings.dart
index 8d78e10118e04894082d5acc46aaed580c413ee6..9b7dc994ce6f4866f75fc6db3e34d278da18bd43 100644
--- a/pkg/compiler/lib/src/warnings.dart
+++ b/pkg/compiler/lib/src/warnings.dart
@@ -2249,6 +2249,18 @@ main() sync* {
"Cannot patch non-function with function patch "
"'#{functionName}'.");
+ static const MessageKind EXTERNAL_WITH_BODY = const MessageKind(
+ "External function '#{functionName}' cannot have a function body.",
+ options: const ["--output-type=dart"],
+ howToFix: "Try removing the 'external' modifier or the function body.",
+ examples: const ["""
+external foo() => 0;
+main() => foo();
+""", """
+external foo() {}
+main() => foo();
+"""]);
+
//////////////////////////////////////////////////////////////////////////////
// Patch errors end.
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698