Skip to content

Added null-shorting rule to treat selector ! like other selectors #1162

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

Merged
merged 2 commits into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions accepted/future-releases/nnbd/feature-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Status: Draft

## CHANGELOG

2020.10.14
- Include selector `!` among the null-shorting constructs.

2020.10.12
- Clarify that operators not mentioned explicitly in the rules
do not participate in the null-shorting transformation.
Expand Down Expand Up @@ -1336,6 +1339,8 @@ continuation.
- `SHORT[EXP(e1), fn[x] => x[EXP(e2)]]`
- If `e1` translates to `F` then `e1[e2]` translates to:
- `PASSTHRU[F, fn[x] => x[EXP(e2)]]`
- If `e` translates to `F` then `e!` translates to:
- `PASSTHRU[F, fn[x] => x!]`
- The assignment `e1?.f = e2` translates to:
- `SHORT[EXP(e1), fn[x] => x.f = EXP(e2)]`
- The other assignment operators are handled equivalently.
Expand Down