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

Comments

@leafpetersen
Copy link
Member

commented Mar 29, 2016

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.

@jmesserly

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2016

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

@leafpetersen

This comment has been minimized.

Copy link
Member Author

commented Aug 10, 2016

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

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2016

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

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2016

fyi working on this

@jmesserly

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2016

@jmesserly jmesserly closed this in e36fa2b Aug 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.