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

Side by Side Diff: lib/compiler/implementation/warnings.dart

Issue 10083007: Resolve implicit super calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 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 class MessageKind { 5 class MessageKind {
6 final String template; 6 final String template;
7 const MessageKind(this.template); 7 const MessageKind(this.template);
8 8
9 static final GENERIC = const MessageKind('#{1}'); 9 static final GENERIC = const MessageKind('#{1}');
10 10
(...skipping 22 matching lines...) Expand all
33 'unreachable code'); 33 'unreachable code');
34 static final MISSING_RETURN = const MessageKind( 34 static final MISSING_RETURN = const MessageKind(
35 'missing return'); 35 'missing return');
36 static final MAYBE_MISSING_RETURN = const MessageKind( 36 static final MAYBE_MISSING_RETURN = const MessageKind(
37 'not all paths lead to a return or throw statement'); 37 'not all paths lead to a return or throw statement');
38 38
39 static final CANNOT_RESOLVE = const MessageKind( 39 static final CANNOT_RESOLVE = const MessageKind(
40 'cannot resolve #{1}'); 40 'cannot resolve #{1}');
41 static final CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( 41 static final CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind(
42 'cannot resolve constructor #{1}'); 42 'cannot resolve constructor #{1}');
43 static final CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
44 'cannot resolve constructor #{1} for implicit super call');
43 static final CANNOT_RESOLVE_TYPE = const MessageKind( 45 static final CANNOT_RESOLVE_TYPE = const MessageKind(
44 'cannot resolve type #{1}'); 46 'cannot resolve type #{1}');
45 static final DUPLICATE_DEFINITION = const MessageKind( 47 static final DUPLICATE_DEFINITION = const MessageKind(
46 'duplicate definition of #{1}'); 48 'duplicate definition of #{1}');
47 static final NOT_A_TYPE = const MessageKind( 49 static final NOT_A_TYPE = const MessageKind(
48 '#{1} is not a type'); 50 '#{1} is not a type');
49 static final NOT_A_PREFIX = const MessageKind( 51 static final NOT_A_PREFIX = const MessageKind(
50 '#{1} is not a prefix'); 52 '#{1} is not a prefix');
51 static final NO_SUPER_IN_OBJECT = const MessageKind( 53 static final NO_SUPER_IN_OBJECT = const MessageKind(
52 "'Object' does not have a superclass"); 54 "'Object' does not have a superclass");
(...skipping 27 matching lines...) Expand all
80 'cyclic constructor redirection'); 82 'cyclic constructor redirection');
81 static final REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind( 83 static final REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind(
82 'redirecting constructor cannot have a body'); 84 'redirecting constructor cannot have a body');
83 static final REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind( 85 static final REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind(
84 'redirecting constructor cannot have other initializers'); 86 'redirecting constructor cannot have other initializers');
85 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind( 87 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind(
86 "'Object' cannot have a super initializer"); 88 "'Object' cannot have a super initializer");
87 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind( 89 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind(
88 'cannot have more than one super initializer'); 90 'cannot have more than one super initializer');
89 static final NO_MATCHING_CONSTRUCTOR = const MessageKind( 91 static final NO_MATCHING_CONSTRUCTOR = const MessageKind(
90 'no matching constructor found'); 92 "super call arguments and constructor parameters don't match");
93 static final NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
94 "implicit super call arguments and constructor parameters don't match");
91 static final NO_CONSTRUCTOR = const MessageKind( 95 static final NO_CONSTRUCTOR = const MessageKind(
92 '#{1} is a #{2}, not a constructor'); 96 '#{1} is a #{2}, not a constructor');
93 static final FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( 97 static final FIELD_PARAMETER_NOT_ALLOWED = const MessageKind(
94 'a field parameter is only allowed in generative constructors'); 98 'a field parameter is only allowed in generative constructors');
95 static final INVALID_PARAMETER = const MessageKind( 99 static final INVALID_PARAMETER = const MessageKind(
96 "cannot resolve parameter"); 100 "cannot resolve parameter");
97 static final NOT_INSTANCE_FIELD = const MessageKind( 101 static final NOT_INSTANCE_FIELD = const MessageKind(
98 '#{1} is not an instance field'); 102 '#{1} is not an instance field');
99 static final NO_CATCH_NOR_FINALLY = const MessageKind( 103 static final NO_CATCH_NOR_FINALLY = const MessageKind(
100 "expected 'catch' or 'finally'"); 104 "expected 'catch' or 'finally'");
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 String toString() => message.toString(); 225 String toString() => message.toString();
222 } 226 }
223 227
224 class CompileTimeConstantError { 228 class CompileTimeConstantError {
225 final Message message; 229 final Message message;
226 CompileTimeConstantError.message(this.message); 230 CompileTimeConstantError.message(this.message);
227 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 231 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
228 : message = new Message(kind, arguments); 232 : message = new Message(kind, arguments);
229 String toString() => message.toString(); 233 String toString() => message.toString();
230 } 234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698