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

Design Meeting Notes, 1/5/2024 #56965

Closed
DanielRosenwasser opened this issue Jan 5, 2024 · 4 comments
Closed

Design Meeting Notes, 1/5/2024 #56965

DanielRosenwasser opened this issue Jan 5, 2024 · 4 comments
Labels
Design Notes Notes from our design meetings

Comments

@DanielRosenwasser
Copy link
Member

Avoid Widening Returned/Yielded Types in Const Contexts

#56858

  • Idea is to do a specific check when widening.
  • Feels like an ad-hoc fix is not the right one?
  • Why doesn't the const context give you the non-widening literal type in the first place?
  • This is about const type paramerters - it's really more tied to ordering of when we decide to widen a function type.
  • Could take a few views:
  • We mostly feel like this is desirable - not like you need a ton of explanation of what's happening.
  • Conclusion: we're mostly inclined to take the PR, barring any implementation problems.
    • Want tests for
      • Overloads
      • Async functions
      • Async yields
@DanielRosenwasser DanielRosenwasser added the Design Notes Notes from our design meetings label Jan 5, 2024
@DanielRosenwasser
Copy link
Member Author

CC @Andarist

@christianalfoni
Copy link

As I understand from the conclusion you are inclined to fix it, but I have not seen updates in the referenced issue. Was just curious if you are still inclined to fix it? 😄

@Andarist
Copy link
Contributor

This one has slipped my radar. I need to address the feedback for #56859 to get it landed. I don't think it fixes anyhow your issue though. This is solely about constness of those return statements/expressions when combined with const type parameters and not about "exactness"

@christianalfoni
Copy link

Oh, I missed the emphasis on const here. Sorry! But great I was able to put it back on the radar 😅 blip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Notes Notes from our design meetings
Projects
None yet
Development

No branches or pull requests

4 participants