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

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

Issue 12217036: Check arguments counts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Analyze additional arguments. Created 7 years, 10 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
11 static const GENERIC = const MessageKind('#{text}'); 11 static const GENERIC = const MessageKind('#{text}');
12 12
13 static const NOT_ASSIGNABLE = const MessageKind( 13 static const NOT_ASSIGNABLE = const MessageKind(
14 '#{fromType} is not assignable to #{toType}'); 14 '#{fromType} is not assignable to #{toType}');
15 static const VOID_EXPRESSION = const MessageKind( 15 static const VOID_EXPRESSION = const MessageKind(
16 'expression does not yield a value'); 16 'expression does not yield a value');
17 static const VOID_VARIABLE = const MessageKind( 17 static const VOID_VARIABLE = const MessageKind(
18 'variable cannot be of type void'); 18 'variable cannot be of type void');
19 static const RETURN_VALUE_IN_VOID = const MessageKind( 19 static const RETURN_VALUE_IN_VOID = const MessageKind(
20 'cannot return value from void function'); 20 'cannot return value from void function');
21 static const RETURN_NOTHING = const MessageKind( 21 static const RETURN_NOTHING = const MessageKind(
22 'value of type #{returnType} expected'); 22 'value of type #{returnType} expected');
23 static const MISSING_ARGUMENT = const MessageKind( 23 static const MISSING_ARGUMENT = const MessageKind(
24 'missing argument of type #{argumentType}'); 24 'missing argument of type #{argumentType}');
25 static const ADDITIONAL_ARGUMENT = const MessageKind( 25 static const ADDITIONAL_ARGUMENT = const MessageKind(
26 'additional argument'); 26 'additional argument');
27 static const NAMED_ARGUMENT_NOT_FOUND = const MessageKind(
28 "no named argument '#{argumentName}' found on method");
27 static const METHOD_NOT_FOUND = const MessageKind( 29 static const METHOD_NOT_FOUND = const MessageKind(
28 'no method named #{methodName} in class #{className}'); 30 'no method named #{methodName} in class #{className}');
29 static const MEMBER_NOT_STATIC = const MessageKind( 31 static const MEMBER_NOT_STATIC = const MessageKind(
30 '#{className}.#{memberName} is not static'); 32 '#{className}.#{memberName} is not static');
31 static const NO_INSTANCE_AVAILABLE = const MessageKind( 33 static const NO_INSTANCE_AVAILABLE = const MessageKind(
32 '#{name} is only available in instance methods'); 34 '#{name} is only available in instance methods');
33 35
34 static const UNREACHABLE_CODE = const MessageKind( 36 static const UNREACHABLE_CODE = const MessageKind(
35 'unreachable code'); 37 'unreachable code');
36 static const MISSING_RETURN = const MessageKind( 38 static const MISSING_RETURN = const MessageKind(
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 559
558 class CompileTimeConstantError extends Diagnostic { 560 class CompileTimeConstantError extends Diagnostic {
559 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 561 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
560 : super(kind, arguments); 562 : super(kind, arguments);
561 } 563 }
562 564
563 class CompilationError extends Diagnostic { 565 class CompilationError extends Diagnostic {
564 CompilationError(MessageKind kind, [Map arguments = const {}]) 566 CompilationError(MessageKind kind, [Map arguments = const {}])
565 : super(kind, arguments); 567 : super(kind, arguments);
566 } 568 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/typechecker.dart ('k') | tests/compiler/dart2js/type_checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698