Skip to content

Design Meeting Notes, 1/5/2024 #56965

Closed
Closed
@DanielRosenwasser

Description

@DanielRosenwasser

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions