Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax function subtyping between optional and non-optional parameters #7777

Closed
munificent opened this issue Jan 8, 2013 · 2 comments
Closed
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug

Comments

@munificent
Copy link
Member

I just checked in this patch: https://codereview.chromium.org/11794051/

This changes a line of code from:

  process.onExit = completer.complete;

to:

  process.onExit = (exitCode) => completer.complete(exitCode);

You'll note this appears to be a pointless lambda that just forwards. The reason is that Completer.complete takes an optional argument, and the type of process.onExit here has a mandatory positional argument. The original code thus fails in checked mode with a type error.

Peter saw this patch and said:

> FYI. Lars and I talked about this yesterday. I think we should change the subtype rule. You should file a bug.

And here it is.

@munificent
Copy link
Member Author

Added Duplicate label.
Marked as being merged into #7776.

@gbracha
Copy link
Contributor

gbracha commented Jan 8, 2013

Marked as being merged into #2706.

@munificent munificent added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report labels Jan 8, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants