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

(Proposal) Default constructor with arguments #469

Open
duzenko opened this issue Jul 23, 2019 · 0 comments
Open

(Proposal) Default constructor with arguments #469

duzenko opened this issue Jul 23, 2019 · 0 comments
Labels
request Requests to resolve a particular developer problem

Comments

@duzenko
Copy link

duzenko commented Jul 23, 2019

I believe allowing constructors with arguments to be default would save us a lot of typing and dead-weight code space.

class FieldModel {
  FieldModel(Map data) {
     ...
  }
}

class SealerModel extends FieldModel {
//  SealerModel(Map data) : super(data);
}

Instead of the compile error I'd like that constructor to be picked up and used as default for the subclass.

error: The superclass 'FieldModel' doesn't have a zero argument constructor. (no_default_super_constructor_implicit at ...

@lrhn lrhn added the request Requests to resolve a particular developer problem label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Requests to resolve a particular developer problem
Projects
None yet
Development

No branches or pull requests

2 participants