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

Consider using Object as type argument for generic parameters in place of dynamic #30390

Open
natebosch opened this issue Aug 10, 2017 · 0 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-a type-enhancement A request for a change that isn't a bug

Comments

@natebosch
Copy link
Member

This is mainly coming up because of how it interacts with --no-implicit-dynamic. We're considering enabling that flag in more places because it's helping us catch bugs - but it also interacts poorly with signatures that take generic classes with <dynamic>

I'm not sure how many APIs are impacted here but we can take one example: the Set.from constructor:

As it is, Set.from(Iterable elements) there is an implicit dynamic error in new Set<String>.from(['foo']);. If instead the signature were Set.from(Iterable<Object> elements) this would be error free.

cc @leafpetersen

@natebosch natebosch added the area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. label Aug 10, 2017
@anders-sandholm anders-sandholm added the type-enhancement A request for a change that isn't a bug label Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-a type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants