-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
NNBDIssues related to NNBD ReleaseIssues related to NNBD ReleaseP2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler
Milestone
Description
DDC does not correctly parenthesize when printing a function type to show nullability of the function.
Given the dart:
main() {
var foo = (int Function()? fn) => fn == null ? 0 : fn();
print(foo.runtimeType);
}The vm and dart2js prints:
((() => int)?) => int
while ddc prints:
(() => int?) => int
Metadata
Metadata
Assignees
Labels
NNBDIssues related to NNBD ReleaseIssues related to NNBD ReleaseP2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler