From 6c2cbb34f1403cb5b9191bbfc82778c0c3ca2bf7 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Mon, 20 Aug 2018 22:35:10 -0400 Subject: [PATCH] * Remove concrete type from `ReflectedTypeParameter`. --- angel_container/CHANGELOG.md | 3 +++ angel_container/lib/src/mirrors/reflector.dart | 3 +-- angel_container/lib/src/reflector.dart | 9 +++------ angel_container/pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/angel_container/CHANGELOG.md b/angel_container/CHANGELOG.md index 4ca4d534..43ba4b97 100644 --- a/angel_container/CHANGELOG.md +++ b/angel_container/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.0.0-alpha.5 +* Remove concrete type from `ReflectedTypeParameter`. + # 1.0.0-alpha.4 * Safely handle `void` return types of methods. diff --git a/angel_container/lib/src/mirrors/reflector.dart b/angel_container/lib/src/mirrors/reflector.dart index ca865dd2..7a6d541f 100644 --- a/angel_container/lib/src/mirrors/reflector.dart +++ b/angel_container/lib/src/mirrors/reflector.dart @@ -54,8 +54,7 @@ class _ReflectedTypeParameter extends ReflectedTypeParameter { final dart.TypeVariableMirror mirror; _ReflectedTypeParameter(this.mirror) - : super( - dart.MirrorSystem.getName(mirror.simpleName), mirror.reflectedType); + : super(dart.MirrorSystem.getName(mirror.simpleName)); } class _ReflectedTypeMirror extends ReflectedType { diff --git a/angel_container/lib/src/reflector.dart b/angel_container/lib/src/reflector.dart index 7f988c60..224b2b35 100644 --- a/angel_container/lib/src/reflector.dart +++ b/angel_container/lib/src/reflector.dart @@ -166,16 +166,13 @@ class ReflectedParameter { class ReflectedTypeParameter { final String name; - final Type type; - const ReflectedTypeParameter(this.name, this.type); + const ReflectedTypeParameter(this.name); @override - int get hashCode => hash2(name, type); + int get hashCode => hashObjects([name]); @override bool operator ==(other) => - other is ReflectedTypeParameter && - other.name == name && - other.type == type; + other is ReflectedTypeParameter && other.name == name; } diff --git a/angel_container/pubspec.yaml b/angel_container/pubspec.yaml index 963dc15f..9fc0a5c1 100644 --- a/angel_container/pubspec.yaml +++ b/angel_container/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_container -version: 1.0.0-alpha.4 +version: 1.0.0-alpha.5 author: Tobe O description: "A better IoC container and dependency injector for Angel, ultimately allowing Angel to be used without dart:mirrors." homepage: https://github.com/angel-dart/container.git