-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Block-local types with the same name can silently give wrong runtime results #13340
Comments
Should type declarations be allowed inside blocks ?, Whats does it solves?. |
that feature is used heavily, removing it would be a pointless breaking change; it's a sensible feature IMO, for scoping (eg very useful in tests, but not just that) |
@timotheecour why the hell your code examples (in multiple issues that I've opened) have indentation?? Maybe it is indented in your files so it is easier and faster for you to just copy-paste them as they are, but it is harder and slower for everybody else to reproduce it. Thank you in advance. |
To me it looks like a duplicate. In all cases the wrong |
Block-local types with the same name can silently give wrong runtime results.
this is directly caused by #5170 but hesistant to call it a duplicate because in following case the result is worse:
Example
Current Output
Expected Output
Additional Information
The text was updated successfully, but these errors were encountered: