Index: pkg/compiler/lib/src/serialization/element_serialization.dart |
diff --git a/pkg/compiler/lib/src/serialization/element_serialization.dart b/pkg/compiler/lib/src/serialization/element_serialization.dart |
index 3182596edc2b453e5ae3cdc9a66a0a5809beb096..7069b51ff565b21f1e0846630d7f7686978132ce 100644 |
--- a/pkg/compiler/lib/src/serialization/element_serialization.dart |
+++ b/pkg/compiler/lib/src/serialization/element_serialization.dart |
@@ -8,6 +8,7 @@ import '../common.dart'; |
import '../constants/constructors.dart'; |
import '../constants/expressions.dart'; |
import '../dart_types.dart'; |
+import '../diagnostics/messages.dart'; |
import '../elements/elements.dart'; |
import '../elements/modelx.dart' show ErroneousElementX; |
import 'constant_serialization.dart'; |
@@ -213,8 +214,8 @@ class ErrorSerializer implements ElementSerializer { |
encoder.setEnum(Key.MESSAGE_KIND, element.messageKind); |
if (element.messageArguments.isNotEmpty) { |
MapEncoder mapEncoder = encoder.createMap(Key.ARGUMENTS); |
- element.messageArguments.forEach((String key, String value) { |
- mapEncoder.setString(key, value); |
+ element.messageArguments.forEach((String key, var value) { |
+ mapEncoder.setString(key, Message.convertToString(value)); |
}); |
} |
} |