Chromium Code Reviews| Index: runtime/lib/mirrors.cc |
| diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc |
| index 7ab68b6a0c650a8e397e785e62f31e4daa7eccca..a6ba2999c8309962ae8c90379ff1c91506376b7c 100644 |
| --- a/runtime/lib/mirrors.cc |
| +++ b/runtime/lib/mirrors.cc |
| @@ -305,9 +305,16 @@ DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) { |
| GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0)); |
| const Class& cls = Class::Handle(type.type_class()); |
| ASSERT(!cls.IsNull()); |
| - return CreateClassMirror(cls, |
| - AbstractType::Handle(), |
| - Instance::null_instance()); |
| + // Strip the type for generics only. |
| + if (cls.NumTypeParameters() == 0) { |
| + return CreateClassMirror(cls, |
| + type, |
| + Instance::null_instance()); |
| + } else { |
| + return CreateClassMirror(cls, |
| + AbstractType::Handle(), |
| + Instance::null_instance()); |
|
siva
2013/08/19 21:15:43
I think we should be using "Object::null_instance(
|
| + } |
| } |