mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:01:20 +00:00
Fix wrong assert in InvocationMirror_unpackTypeArguments (take 2)
It was pointed out that the previous fix
(5c74e0e16f
) wasn't strong mode safe
because the returned array when length = 0 was not properly typed.
This fixes the issue by removing the old fix and simply removing the
assert.
Bug: 31381
Change-Id: I6d63d3329da2711067f632adbb9be998a4d468d9
Reviewed-on: https://dart-review.googlesource.com/37741
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
parent
8489a843db
commit
e4238bea4c
|
@ -483,10 +483,6 @@ DEFINE_NATIVE_ENTRY(InvocationMirror_unpackTypeArguments, 1) {
|
|||
const TypeArguments& type_arguments =
|
||||
TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
|
||||
const intptr_t len = type_arguments.Length();
|
||||
if (len == 0) {
|
||||
return Array::empty_array().raw();
|
||||
}
|
||||
ASSERT(len > 0);
|
||||
const Array& type_list = Array::Handle(zone, Array::New(len));
|
||||
TypeArguments& type_list_type_args =
|
||||
TypeArguments::Handle(zone, TypeArguments::New(1));
|
||||
|
|
Loading…
Reference in a new issue