From 6467500a14e6c29af1c5f7b4ab121c252818d059 Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Wed, 19 Dec 2018 11:05:28 -0700 Subject: [PATCH] Make _IdentityConverter compatible with Dart SDK 1.x (#18) Fixes DDC compilation regression introduced by #17 --- CHANGELOG.md | 4 ++++ lib/src/identity_codec.dart | 6 +++--- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f300a0c881fe8..d3b34108dabd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.1 + + * Fixed a DDC compilation regression for consumers using the Dart 1.x SDK that was introduced in `2.1.0`. + ## 2.1.0 * Added an `IdentityCodec` which implements `Codec` for use as default diff --git a/lib/src/identity_codec.dart b/lib/src/identity_codec.dart index 1936481518d36..3a2d028b0d605 100644 --- a/lib/src/identity_codec.dart +++ b/lib/src/identity_codec.dart @@ -1,7 +1,7 @@ import 'dart:convert'; class _IdentityConverter extends Converter { - const _IdentityConverter(); + _IdentityConverter(); T convert(T input) => input; } @@ -17,8 +17,8 @@ class _IdentityConverter extends Converter { class IdentityCodec extends Codec { const IdentityCodec(); - Converter get decoder => _IdentityConverter(); - Converter get encoder => _IdentityConverter(); + Converter get decoder => new _IdentityConverter(); + Converter get encoder => new _IdentityConverter(); /// Fuse with an other codec. /// diff --git a/pubspec.yaml b/pubspec.yaml index f3a4d6727f565..e788c4879b7fe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: convert -version: 2.1.0 +version: 2.1.1 description: Utilities for converting between data representations. author: Dart Team homepage: https://github.com/dart-lang/convert