Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

dynamic dispatch doesn't handle extensions #142

Closed
jmesserly opened this issue Apr 20, 2015 · 1 comment
Closed

dynamic dispatch doesn't handle extensions #142

jmesserly opened this issue Apr 20, 2015 · 1 comment

Comments

@jmesserly
Copy link
Contributor

It won't find methods like: list[core.$where]

note, if we fix related issue: #138, then we only need to look for extensions when we get a native Array type. If we get a real Dart subtype, it will have the named method (e.g. where) ... we have similar issues right now with dynamic sends to all String/int/num/double/bool members.

@jmesserly
Copy link
Contributor Author

@jacob314 @jmesserly Do you guys have thoughts on how to handle this?

yeah, what I would try, we have registerExtension which informs dart_runtime about the Array<->List correspondence, that should be enough to find the symbols and ensure we add them to a dynamic dispatch table. Then everywhere we currently do obj[name] becomes a slightly more sophisticated check, that also knows to check for symbol too.

For certain names, we probably can just check the symbol first. Although note the related issues in #138.

@jmesserly jmesserly self-assigned this May 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants