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

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

Issue 12326041: Make an erroneous element when setting a final field. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.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
===================================================================
--- sdk/lib/_internal/compiler/implementation/resolution/members.dart (revision 18815)
+++ sdk/lib/_internal/compiler/implementation/resolution/members.dart (working copy)
@@ -2229,6 +2229,11 @@
}
} else if (target.impliesType()) {
compiler.backend.registerThrowNoSuchMethod();
+ } else if (target.modifiers.isFinal() || target.modifiers.isConst()) {
+ setter =
+ warnAndCreateErroneousElement(node.selector, target.name,
+ MessageKind.CANNOT_RESOLVE_SETTER);
+ compiler.backend.registerThrowNoSuchMethod();
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698