Skip to content

Remove support for deprecated leading new in comment references #3529

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 1 commit into from
Oct 19, 2023

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Oct 16, 2023

The syntax, [new Foo] and [Foo.Foo] have long been deprecated. The analyzer reports [new Foo] as well, suggesting to replace with [Foo.new]. This Change removes the support for the deprecated syntaxes.

All examples in tests have been changed to [Foo.new]. There are also tests for the disambiguation of a constructor and an instance field with the same name which is allowed), e.g. in [Foo.foo]. The supported disambiguation hint is to add trailing parentheses: [Foo.foo()] to indicate the constructor.

Fixes #3531


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@srawlins
Copy link
Member Author

@srawlins srawlins merged commit b2de813 into dart-lang:main Oct 19, 2023
@srawlins srawlins deleted the new-tearoff branch October 19, 2023 18:33
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.

Drop support of leading new in comment references.
2 participants