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

Compiler error converted to warning in section 7.5.2: Factories #3080

Closed
gbracha opened this issue May 16, 2012 · 3 comments
Closed

Compiler error converted to warning in section 7.5.2: Factories #3080

gbracha opened this issue May 16, 2012 · 3 comments
Assignees
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue web-dart2js
Milestone

Comments

@gbracha
Copy link
Contributor

gbracha commented May 16, 2012

This used to be a compile time error:

It is a static warning if M is not the name of the immediately enclosing class or the name of an interface in the enclosing lexical scope.

Once the typechecker reports this as a warning, the error can be removed from dart2js.

@kasperl
Copy link

kasperl commented Sep 3, 2012

Set owner to @karlklose.
Added this to the M1 milestone.
Marked this as being blocked by #3078.
Unmarked this as being blocked by #3078.

@karlklose
Copy link
Contributor

It is not possible to resolve such a factory and thus dart2js never analyzes it. (The same is true for the VM.)

@gilad: please reopen if you think that we should warn about it.


cc @gbracha.
Added WontFix label.

@gbracha
Copy link
Contributor Author

gbracha commented Sep 18, 2012

The language has changed so much since May that this bug is obsolete. However, there is a requirement to give an error for a factory constructor whose name does not start with the name of the enclosing class:

class Foo{
  factory Bar.make(){return new Bar();} // compile-time error
}

Now, if no one ever calls this, you never compile it and that is ok. However, if it gets called, it is an error, If the compiler is used during development (as opposed to deployment) there needs to be a way to force everything to get compiled. Right now we rely on the analyzer for this.

@gbracha gbracha added this to the M1 milestone Sep 18, 2012
@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue and removed resolution-wont_fix 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
closed-not-planned Closed as we don't intend to take action on the reported issue web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants