| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index d5f5ca30c09ecea8c50f0b56a13fd3f366162c85..b02bf40f3eb24fcac0edbc90eb1170472694546b 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -3972,7 +3972,8 @@ void Parser::ParseFieldDefinition(ClassDesc* members, MemberDesc* field) {
|
| // value is not assignable (assuming checked mode and disregarding actual
|
| // mode), the field value is reset and a kImplicitStaticFinalGetter is
|
| // created at finalization time.
|
| - if (LookaheadToken(1) == Token::kSEMICOLON) {
|
| + if ((LookaheadToken(1) == Token::kSEMICOLON) ||
|
| + (LookaheadToken(1) == Token::kCOMMA)) {
|
| has_simple_literal = IsSimpleLiteral(*field->type, &init_value);
|
| }
|
| SkipExpr();
|
| @@ -4008,6 +4009,9 @@ void Parser::ParseFieldDefinition(ClassDesc* members, MemberDesc* field) {
|
| // and rules out many fields from being unnecessary unboxing candidates.
|
| if (!field->has_static && has_initializer && has_simple_literal) {
|
| class_field.RecordStore(init_value);
|
| + if (!init_value.IsNull() && init_value.IsDouble()) {
|
| + class_field.set_is_double_initialized(true);
|
| + }
|
| }
|
|
|
| // For static final fields (this includes static const fields), set value to
|
|
|