Drop support of leading new
in comment references.
#3531
Labels
P2
A bug or feature request we're likely to work on
type-tech-debt
Issues that slow or block desirable development paths for Dartdoc, or create such problems for users
With the introduction of constructor tear-offs and the
Foo.new
syntax, we deprecated support for writing/// [new Foo]
. The analyzer warns about this deprecated syntax.There is one purpose which
new
still serves, which is to disambiguate between an instance member and a constructor sharing the same name.[A.b]
is ambiguous, but dartdoc chooses to point this to an instance member, if one exists. For the developer to disambiguate, they can write[new A.b]
or[A.b()]
. In order to align with the optional-new, new-is-not-idiomatic-any-more situations, dartdoc can drop support for the leadingnew
word, and still offer to disambiguate with the parentheses.Most importantly, we're aligning on a single resolution of comment references, in the analyzer. The analyzer has dropped support for the leading
new
, and I plan to add support for a trailing()
as per dart-lang/sdk#47553.The text was updated successfully, but these errors were encountered: