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

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

Issue 18523002: Report error when using initializing formals in redirecting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 part of dart2js; 5 part of dart2js;
6 6
7 class MessageKind { 7 class MessageKind {
8 final String template; 8 final String template;
9 const MessageKind(this.template); 9 const MessageKind(this.template);
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 static const SUPER_INITIALIZER_IN_OBJECT = const MessageKind( 113 static const SUPER_INITIALIZER_IN_OBJECT = const MessageKind(
114 "'Object' cannot have a super initializer"); 114 "'Object' cannot have a super initializer");
115 static const DUPLICATE_SUPER_INITIALIZER = const MessageKind( 115 static const DUPLICATE_SUPER_INITIALIZER = const MessageKind(
116 'cannot have more than one super initializer'); 116 'cannot have more than one super initializer');
117 static const INVALID_ARGUMENTS = const MessageKind( 117 static const INVALID_ARGUMENTS = const MessageKind(
118 "arguments do not match the expected parameters of #{methodName}"); 118 "arguments do not match the expected parameters of #{methodName}");
119 static const NO_MATCHING_CONSTRUCTOR = const MessageKind( 119 static const NO_MATCHING_CONSTRUCTOR = const MessageKind(
120 "super call arguments and constructor parameters don't match"); 120 "super call arguments and constructor parameters don't match");
121 static const NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( 121 static const NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
122 "implicit super call arguments and constructor parameters don't match"); 122 "implicit super call arguments and constructor parameters don't match");
123 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( 123 static const INITIALIZING_FORMAL_NOT_ALLOWED = const MessageKind(
124 'a field parameter is only allowed in generative constructors'); 124 'an initializing formal parameter is only allowed in '
125 'non-redirecting generative constructors');
125 static const INVALID_PARAMETER = const MessageKind( 126 static const INVALID_PARAMETER = const MessageKind(
126 "cannot resolve parameter"); 127 "cannot resolve parameter");
127 static const NOT_INSTANCE_FIELD = const MessageKind( 128 static const NOT_INSTANCE_FIELD = const MessageKind(
128 '#{fieldName} is not an instance field'); 129 '#{fieldName} is not an instance field');
129 static const NO_CATCH_NOR_FINALLY = const MessageKind( 130 static const NO_CATCH_NOR_FINALLY = const MessageKind(
130 "expected 'catch' or 'finally'"); 131 "expected 'catch' or 'finally'");
131 static const EMPTY_CATCH_DECLARATION = const MessageKind( 132 static const EMPTY_CATCH_DECLARATION = const MessageKind(
132 'expected an identifier in catch declaration'); 133 'expected an identifier in catch declaration');
133 static const EXTRA_CATCH_DECLARATION = const MessageKind( 134 static const EXTRA_CATCH_DECLARATION = const MessageKind(
134 'extra parameter in catch declaration'); 135 'extra parameter in catch declaration');
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 636
636 class CompileTimeConstantError extends Diagnostic { 637 class CompileTimeConstantError extends Diagnostic {
637 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 638 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
638 : super(kind, arguments); 639 : super(kind, arguments);
639 } 640 }
640 641
641 class CompilationError extends Diagnostic { 642 class CompilationError extends Diagnostic {
642 CompilationError(MessageKind kind, [Map arguments = const {}]) 643 CompilationError(MessageKind kind, [Map arguments = const {}])
643 : super(kind, arguments); 644 : super(kind, arguments);
644 } 645 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698