diff --git a/incubation/reflection/lib/src/mirrors/mirror_system.dart b/incubation/reflection/lib/src/mirrors/mirror_system.dart index 787c789..d5198f1 100644 --- a/incubation/reflection/lib/src/mirrors/mirror_system.dart +++ b/incubation/reflection/lib/src/mirrors/mirror_system.dart @@ -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); }