Skip to content

cascading operators break strong mode type checking #29718

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

Closed
zelam opened this issue May 24, 2017 · 2 comments
Closed

cascading operators break strong mode type checking #29718

zelam opened this issue May 24, 2017 · 2 comments
Labels
closed-duplicate Closed in favor of an existing report language-strong-mode-polish legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@zelam
Copy link

zelam commented May 24, 2017

https://dartpad.dartlang.org/645ed8079bc07d4976a6cc773a2fa269

Derived d = new Base()..val = 'd';
Derived e = new Base();

I expect both those lines to have a compile time error in strong mode, but only the second line does

@leafpetersen
Copy link
Member

Note that ``--no-implicit-casts` will make both of those errors. But agreed, the code that looks for "stupid" downcasts should also catch cascades.

@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels May 30, 2017
@jmesserly jmesserly added the closed-duplicate Closed in favor of an existing report label Jun 28, 2018
@jmesserly
Copy link

this is now being tracked in #30542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report language-strong-mode-polish legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants