Skip to content

CastMap does an invalid cast on 'remove' #45473

Description

@stuartmorgan-g

STR:

  final foo = json.decode('{}').cast<String, Object>();
  foo.remove('akey');

V remove(Object? key) => _source.remove(key) as V;
is incorrect, since remove returns a nullable value even if the value type is non-null.

Metadata

Metadata

Assignees

Labels

area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-coretype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions