refactor: refactored reflection to be more like dart:mirrors test pass
This commit is contained in:
parent
14e1fc099d
commit
44fb7ab881
1 changed files with 3 additions and 0 deletions
|
@ -261,6 +261,9 @@ class MirrorSystem implements MirrorSystemContract {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TypeMirrorContract reflectType(Type type) {
|
TypeMirrorContract reflectType(Type type) {
|
||||||
|
if (!Reflector.isReflectable(type)) {
|
||||||
|
throw ArgumentError('Type is not reflectable: $type');
|
||||||
|
}
|
||||||
return _getOrCreateTypeMirror(type);
|
return _getOrCreateTypeMirror(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue