Skip to content

Bad patch file for inspect method from dart:developer in the vm #42676

@jakemac53

Description

@jakemac53

The CFE does not allow nullable argument types to be passed for nullable parameters of external functions.

The vm patch file for the inspect method from dart:developer has the type Object Function(Object) instead of Object? Function(Object?).

Repro program (must be opted in to nnbd):

import 'dart:developer';

void main() {
  int? x;
  inspect(x);
}

Results in:

lib/example.dart:5:11: Error: The argument type 'int?' can't be assigned to the parameter type 'Object'.
 - 'Object' is from 'dart:core'.
  inspect(x);

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD ReleaseP1A high priority bug; for example, a single project is unusable or has many test failuresarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions