-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
NNBDIssues related to NNBD ReleaseIssues related to NNBD ReleaseP1A high priority bug; for example, a single project is unusable or has many test failuresA 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.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Description
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 ReleaseIssues related to NNBD ReleaseP1A high priority bug; for example, a single project is unusable or has many test failuresA 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.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.