Skip to content

Remove comment-based syntax for generic methods #28796

@munificent

Description

@munificent

We currently support and in some places still use the transitional /*<T>*/ syntax for generic methods. Now that real syntax is supported, we should phase out and then eliminate the old syntax.

I can file tracking bugs for the sub-issues if people want, but, for now, here's the known subtasks:

  • Add a deprecation notice when the old syntax is detected. (Do we need to do this?)
  • Remove uses of the syntax in our core libraries.
  • Remove uses of the syntax in other packages and applications we maintain.
  • Remove support in analyzer for parsing the comments and treating them as annotations.

Currently, there are a few places where we still deliberately use the old syntax:

  • The LineSplitter class behaves differently depending on if you enable strong mode or not.
  • Some 'as' checks are marked as as Object /*=ConcreteClass*/ for performance reasons because implementations do not currently take advantage of strong mode.

We'll want to ensure those are addressed first before the syntax is removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).language-strong-mode-polish

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions