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

Array.slice and Array.splice #296

Open
vicb opened this issue Oct 7, 2015 · 2 comments
Open

Array.slice and Array.splice #296

vicb opened this issue Oct 7, 2015 · 2 comments

Comments

@vicb
Copy link
Contributor

vicb commented Oct 7, 2015

Those would emit ListWrapper.slice() and ListWrapper.splice().

Couldn't that be an issue if ListWrapper is not imported ?

How should we deal with that:

  • add the import if not present (not sure how hard this would be ?),
  • inline the logic,
  • do not try to rewrite those
@mprobst
Copy link
Contributor

mprobst commented Oct 9, 2015

I think there was some talk about disabling the "unused import" failure for the generated Angular Dart code. @alexeagle, is that correct?

If so, we could just always generate imports for ListWrapper etc. But I think duplicate imports are still an issue - so we might still have to be smarter and look ahead to see if we need to add the import.

Re inlining the logic, I looked at that when I implemented these, I thought it was too much code. Any other opinions?

@alexeagle
Copy link
Contributor

We've temporarily disabled the unused import analyzer check, but I think we intend to enable it again. @vsavkin knows.

My $0.02 is that we should first take out the façades which can be emitted without any extra wrapper and come back to this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants