refactor: refactored reflection to be more like dart:mirrors test pass

This commit is contained in:
Patrick Stewart 2024-12-21 10:06:39 -07:00
parent 14e1fc099d
commit 44fb7ab881

View file

@ -261,6 +261,9 @@ class MirrorSystem implements MirrorSystemContract {
@override
TypeMirrorContract reflectType(Type type) {
if (!Reflector.isReflectable(type)) {
throw ArgumentError('Type is not reflectable: $type');
}
return _getOrCreateTypeMirror(type);
}