We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code is incorrect, because initializers don't make sense on factory constructors. But analyzer accepts it without error:
class Foo { int i; Foo(); factory Foo.factoryConstructor() : i = 1 { return new Foo(); } } main() { print(new Foo.factoryConstructor()); }
The VM and Dart2js correctly generate an error for this code.
The text was updated successfully, but these errors were encountered:
Removed Priority-Unassigned label. Added Priority-Medium label.
Sorry, something went wrong.
Set owner to @bwilkerson. Added Started label.
https://codereview.chromium.org/705393002/ (bleeding edge revision 41616)
Added Fixed label.
Added this to the 1.8 milestone.
bwilkerson
No branches or pull requests
The following code is incorrect, because initializers don't make sense on factory constructors. But analyzer accepts it without error:
class Foo {
int i;
Foo();
factory Foo.factoryConstructor() : i = 1 {
return new Foo();
}
}
main() {
print(new Foo.factoryConstructor());
}
The VM and Dart2js correctly generate an error for this code.
The text was updated successfully, but these errors were encountered: