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

Unified Diff: runtime/vm/object.cc

Issue 2939553005: Updated parser to produce error when trying to reinitialize final variables in class constructors. … (Closed)
Patch Set: Added test, addressed comments Created 3 years, 6 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 62844ac892779b7ad81664024b61fa86d0e9c57b..f944221720f8d99861882bafc8885bdfb2fab084 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -8169,6 +8169,11 @@ bool Field::IsConsistentWith(const Field& other) const {
}
+bool Field::IsFinalAndInitialized() const {
+ return is_final() && (guarded_cid() != kIllegalCid);
+}
siva 2017/06/13 22:37:56 This method is not needed, see comment later.
bkonyi 2017/06/15 22:32:48 Removed.
+
+
bool Field::IsUninitialized() const {
const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_);
ASSERT(value.raw() != Object::transition_sentinel().raw());
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698