-
Notifications
You must be signed in to change notification settings - Fork 1.7k
dart2js: Type assertions and casts fail for Polymer code #13955
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
Comments
Added Triaged label. |
Are you looking into fixing this, Stephen? Set owner to @rakudrama. |
r28471 is a work-around by always forcing the interceptor variant. What really needs to happen is to pass the interceptor for the tested argument in to all the checked mode and cast helpers so that getInterceptor happens at most once. |
So for now, this issue isn't blocking. Lowering priority. Removed Priority-Critical label. |
This comment was originally written by [email protected] Passing getInterceptor to the helpers is an optimization we don't need to 'fix' the workaround. After talking to Johnni and Karl, we can fix the workaround by checking if a type is implemented by a native type. Unmarked this as being blocked by #9732. |
The type assertions have been worked-around. I don't plan to do the optimization of hoisting the getInterceptor call. Added NotPlanned label. |
This problem is blocking polymer integration with web components.
class Observable {}
class ObservableMixin implements Observable {}
class HtmlElement native ... {}
class PolymerElement extends HtmlElement with ObservableMixin {}
This check fails:
p = ... // a PolymerElement
...
Observable o = p;
The way to fix this is to fix Issue #9732 - all type checking code takes an interceptor with the argument, and the optimizer can specialize or remove the interceptor where appropriate.
The text was updated successfully, but these errors were encountered: