Navigation Menu

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

Dart2JS does not give a static warning if not implementing inherited method interface with inherited method. #7641

Closed
lrhn opened this issue Jan 2, 2013 · 8 comments
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@lrhn
Copy link
Member

lrhn commented Jan 2, 2013

Example:

class C {
  int foo(int x) => x;
}

abstract class D {
  int foo(int x, [int y]);
}

class E extends C implements D {}

typedef int foo2(int x, [int y]);

main() {
  D d = new E();
  foo2 foo = d.foo;
  print(foo(2,2));
}

This should give a static warning since E is a non-static class that doesn't have a method matching the super-interface method D.foo.
It has an inherited method of the same name, but it's not matching (spec, section 7.10).

Gilad: Should this be a compilation error instead?

@peter-ahe-google
Copy link
Contributor

Currently, static warnings are incomplete and untested in dart2js. Instead, users should rely on dart_analyzer (or the Editor) for detecting problems in your code.


Added this to the Later milestone.

@peter-ahe-google
Copy link
Contributor

Added NotPlanned label.

@peter-ahe-google
Copy link
Contributor

Did not intend to close the bug.


Added Triaged label.

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Removed TriageForM5 label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Feb 29, 2016
@sigmundch
Copy link
Member

now handled by CFE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

7 participants