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

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

Issue 23452038: Check cycles in redirecting factories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 fe0c108f1e311faa46c1f8aca536736e06b98001..ecebbecad38301b0f92ded4256b1ab1bbce5c18f 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -169,9 +169,16 @@ class MessageKind {
'Error: Cannot resolve constructor "#{constructorName}".');
static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT =
- const MessageKind(
- 'Error: cannot resolve constructor "#{constructorName}" for implicit'
- 'super call.');
+ const MessageKind('Error: cannot resolve constructor "#{constructorName}"'
+ ' for implicit super call.',
+ howToFix: 'Try explicitly invoking a constructor of the super class',
+ examples: const ["""
+class A {
+ A.foo() {}
+}
+class B etxends A {}
+main() => new B();
+"""]);
static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind(
'Error: Unnamed constructor name must be "#{name}".');
@@ -266,6 +273,9 @@ export 'future.dart';"""}]);
static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind(
'Error: "#{className}" creates a cycle in the class hierarchy.');
+ static const MessageKind CYCLIC_REDIRECTING_FACTORY = const MessageKind(
+ 'Error: Redirecting factory leads to a cyclic redirection.');
+
static const MessageKind INVALID_RECEIVER_IN_INITIALIZER = const MessageKind(
'Error: Field initializer expected.');

Powered by Google App Engine
This is Rietveld 408576698