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

Unified Diff: pkg/kernel/lib/interpreter/interpreter.dart

Issue 3002013002: Fix initialization of instance fields. (Closed)
Patch Set: Add test with instance and static fields. Created 3 years, 4 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 | pkg/kernel/testcases/interpreter/instance_and_static_fields_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/interpreter/interpreter.dart
diff --git a/pkg/kernel/lib/interpreter/interpreter.dart b/pkg/kernel/lib/interpreter/interpreter.dart
index d06b82f8520c7d5224dab33e564c92dfadc73182..d79faeb9650a24d4a6ef777a221c634d7da39cf0 100644
--- a/pkg/kernel/lib/interpreter/interpreter.dart
+++ b/pkg/kernel/lib/interpreter/interpreter.dart
@@ -2108,7 +2108,7 @@ List<InterpreterExpression> _getFieldInitializers(ast.Class class_) {
var fieldInitializers = new List<InterpreterExpression>();
for (Field f in class_.fields) {
- if (f.initializer != null) {
+ if (!f.isStatic && f.initializer != null) {
fieldInitializers.add(new FieldInitializerExpression(f, f.initializer));
}
}
« no previous file with comments | « no previous file | pkg/kernel/testcases/interpreter/instance_and_static_fields_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698