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

Sideways casts should be disallowed #26120

Closed
leafpetersen opened this issue Mar 29, 2016 · 5 comments
Closed

Sideways casts should be disallowed #26120

leafpetersen opened this issue Mar 29, 2016 · 5 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on

Comments

@leafpetersen
Copy link
Member

For backwards compatibility while we transitioned old code to strong mode and added generic method support we've allowed sideways casts in strong mode when the cast would have been an up or down cast in regular Dart. This should be discontinued at some point soon. See TODO(vsm) in DownCast.create in info.dart.

@leafpetersen leafpetersen added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-strong-mode P2 A bug or feature request we're likely to work on labels Mar 29, 2016
@jmesserly
Copy link

@leafpetersen does the no-implicit-casts flag subsume this issue?

@leafpetersen
Copy link
Member Author

I don't think so. Even with implicit casts, at some point we want to start disallowing these. If no-implicit casts becomes the standard, then this becomes moot of course.

@jmesserly
Copy link

I wonder if we're at the point where I could just fix that? it looks easy to do in type_system but I wasn't sure if we were waiting for some reason

@jmesserly jmesserly self-assigned this Aug 10, 2016
@jmesserly
Copy link

fyi working on this

@jmesserly
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

2 participants