| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index 0e28cc09180b361e78704382f18d1ce0a7ddfa75..116388b328332fb66d9d187994f3784c8c78da03 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();
|
| @@ -4010,6 +4011,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
|
|
|