Skip to content

Make it explicit when inference rules are null-safety specific #1102

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
Jul 21, 2020

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Jul 20, 2020

This PR adds phrases like 'Without null safety, ...' and 'with null safety, ...' in inference.md at locations where the rules differ for legacy code and opted-in code. The PR re-introduces the wording from before the change that added support for null safety where needed, such that we now specify both legacy code and code with null safety, and make the distinction explicit.

It also changes the definition of futureValueTypeSchema to use ? to denote the type schema that imposes no constraints, because the rest of inference.md uses that notation.

(We could also change all these occurrences of ? to _. But given that _ is allowed as an identifier that denotes a type, we may need to choose some other notation which is syntactically not a type.)

Note that this PR has no associated implementation effort: It re-introduces legacy wording for the legacy case where needed, and it marks null-safety specific rules as such; it is not intended to change the meaning of the specification.

Copy link
Member

@leafpetersen leafpetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@eernstg eernstg merged commit 1645369 into master Jul 21, 2020
@eernstg eernstg deleted the spec_infer_void_nnbdonly_jul20 branch July 21, 2020 07:15
@eernstg eernstg mentioned this pull request Jul 21, 2020
eernstg added a commit that referenced this pull request Jul 21, 2020
This is a small correction on changes in #1102.
Merge pull request #1105 from dart-lang/spec_1102_fix_jul20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants