-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 warnings for unimplemented methods with noSuchMethod #16030
Labels
closed-obsolete
Closed as the reported issue is no longer relevant
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
Comments
Every component declared using over_react results in a similar error:
The gist of what's going on: class ExampleProps extends UiProps {}
class UiProps implements Function {
ReactElement call([children, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40]);
dynamic noSuchMethod(Invocation i) {
...
}
} Is this the same issue? Or is it different since |
Based on #24337, I would expect my example to not emit warnings. |
greglittlefield-wf
added a commit
to greglittlefield-wf/over_react
that referenced
this issue
Mar 1, 2017
Do so by making the original props class abstract and redeclaring `call` in the impl class. We can safely make this abstract, since we already have a runtime warning when it's instantiated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-obsolete
Closed as the reported issue is no longer relevant
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
Compiling the class:
@Proxy
class Context implements Map {
noSuchMethod(invocation) => mirror.reflect({}).delegate(invocation);
}
Generates warnings about not implementing Map functions:
Warning: 'Context' doesn't implement 'isEmpty'.
Try adding an implementation of 'isEmpty'
From: https://www.dartlang.org/docs/spec/latest/dart-language-specification.html#h.n9p3c8rq84d5
It is a static warning if a concrete class does not have an implementation for a method in any of its superinterfaces unless it declares its own noSuchMethod method (7.10) or is annotated with @proxy.
The text was updated successfully, but these errors were encountered: