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

Nullable record pattern #3481

Merged
merged 4 commits into from
Oct 20, 2023
Merged

Nullable record pattern #3481

merged 4 commits into from
Oct 20, 2023

Conversation

toots
Copy link
Member

@toots toots commented Oct 19, 2023

This PR adds support for optional methods extraction patterns:

# foo = null()
let { foo? } = ()

# foo = 123
let { foo? } = { foo = 123 }

This ties up with inferred types:

def f(x) =
  let { foo? } = x
  foo
end;;
f : ({foo? : 'a}) -> 'a? = <fun>

@toots toots enabled auto-merge October 20, 2023 16:01
@toots toots added this pull request to the merge queue Oct 20, 2023
Merged via the queue into main with commit e1ee6e5 Oct 20, 2023
24 checks passed
@toots toots deleted the nullable-record-pattern branch October 20, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant