| Index: sdk/lib/_internal/lib/mirrors_patch.dart
|
| diff --git a/sdk/lib/_internal/lib/mirrors_patch.dart b/sdk/lib/_internal/lib/mirrors_patch.dart
|
| index 47009848c8972607cc5cc8db586f282668da300d..271f54db7dd7df890cbd73d179fa68ca0a749c06 100644
|
| --- a/sdk/lib/_internal/lib/mirrors_patch.dart
|
| +++ b/sdk/lib/_internal/lib/mirrors_patch.dart
|
| @@ -19,5 +19,11 @@ patch Future<MirrorSystem> mirrorSystemOf(SendPort port) {
|
| patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee);
|
|
|
| patch ClassMirror reflectClass(Type key) {
|
| - return js.reflectType(key).originalDeclaration;
|
| + TypeMirror tm = reflectType(key);
|
| + if (tm is ClassMirror) {
|
| + return (tm as ClassMirror).originalDeclaration;
|
| + }
|
| + throw new ArgumentError("$key does not denote a class");
|
| }
|
| +
|
| +patch TypeMirror reflectType(Type key) => js.reflectType(key);
|
|
|