Fixed EmptyReflector
This commit is contained in:
parent
83873d0fb7
commit
d034fcebe8
3 changed files with 10 additions and 30 deletions
|
@ -1,5 +1,10 @@
|
|||
# Change Log
|
||||
|
||||
## 7.1.0-beta.2
|
||||
|
||||
* Require Dart >= 2.19
|
||||
* Refactored `EmptyReflector`
|
||||
|
||||
## 7.1.0-beta.1
|
||||
|
||||
* Require Dart >= 2.18
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import '../../angel3_container.dart';
|
||||
import 'package:quiver/core.dart';
|
||||
|
||||
final Map<Symbol, String?> _symbolNames = <Symbol, String?>{};
|
||||
|
||||
|
@ -62,14 +61,6 @@ class _EmptyReflectedClass extends ReflectedClass {
|
|||
bool isAssignableTo(ReflectedType? other) {
|
||||
return other == this;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
return other is ReflectedClass && other.hashCode == hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => hash2(this, " ");
|
||||
}
|
||||
|
||||
class _EmptyReflectedType extends ReflectedType {
|
||||
|
@ -89,28 +80,12 @@ class _EmptyReflectedType extends ReflectedType {
|
|||
bool isAssignableTo(ReflectedType? other) {
|
||||
return other == this;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
return other is ReflectedType && other.hashCode == hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => hash2(this, " ");
|
||||
}
|
||||
|
||||
class _EmptyReflectedInstance extends ReflectedInstance {
|
||||
const _EmptyReflectedInstance()
|
||||
: super(const _EmptyReflectedType(), const _EmptyReflectedClass(), null);
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
return other is ReflectedInstance && other.hashCode == hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => hash2(this, " ");
|
||||
|
||||
@override
|
||||
ReflectedInstance getField(String name) {
|
||||
throw UnsupportedError(
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
name: angel3_container
|
||||
version: 7.1.0-beta.1
|
||||
version: 7.1.0-beta.2
|
||||
description: Angel3 hierarchical DI container, and pluggable backends for reflection.
|
||||
homepage: https://angel3-framework.web.app/
|
||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/container/angel_container
|
||||
environment:
|
||||
sdk: '>=2.18.0 <3.0.0'
|
||||
sdk: '>=2.19.0 <3.0.0'
|
||||
dependencies:
|
||||
collection: ^1.15.0
|
||||
quiver: ^3.0.1
|
||||
collection: ^1.17.0
|
||||
quiver: ^3.2.0
|
||||
dev_dependencies:
|
||||
test: ^1.21.0
|
||||
test: ^1.24.0
|
||||
lints: ^2.0.0
|
Loading…
Reference in a new issue