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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 24267002: Emit compile-time error on 'const' formal parameters. (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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/warnings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 9e5f039b60fe043b33df7893d827c349d3bae185..75aa1cbee80c0ab6e487a7b577ea7b7babc4ea07 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -3995,6 +3995,9 @@ class SignatureResolver extends CommonResolverVisitor<Element> {
if (definition is NodeList) {
cancel(node, 'optional parameters are not implemented');
}
+ if (node.modifiers.isConst()) {
+ error(node, MessageKind.FORMAL_DECLARED_CONST);
+ }
if (currentDefinitions != null) {
cancel(node, 'function type parameters not supported');
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698