Skip to content

Type annotated getters/setters #730

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Type annotated getters/setters #730

wants to merge 1 commit into from

Conversation

strub
Copy link
Member

@strub strub commented Mar 4, 2025

This commit introduces the following syntax:

  • m.[:(ty) k] for (m.[k] :~ ty)
  • m.[:(ty) k <- v] for m.[k <- (v :~ ty)]
  • m.[:(ty) k] <- k for m.[k] <- (v :~ ty)

This helps disambiguate the selection of getters and setters using the type of the map's values.

@strub strub self-assigned this Mar 4, 2025
@strub strub requested a review from bgregoir March 4, 2025 11:07
This commit introduces the following syntax:

  - `m.[:(ty) k]` for `(m.[k] :~ ty)`
  - `m.[:(ty) k <- v]` for `m.[k <- (v :~ ty)]`
  - `m.[:(ty) k] <- k` for `m.[k] <- (v :~ ty)`

This helps disambiguate the selection of getters and setters using
the type of the map's values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants