Skip to content

Analyzer complains about error in comment #24985

@zoechi

Description

@zoechi
class EventBus {
  EventData fire(EventType /*<T>*/ eventType, /*<T>*/ EventData data) {
    ...
  }
}

Warning:(35, 31) The name 'T' is not a type and cannot be used as a parameterized type

I saw some code reviews where Dart team members added such comments for future generic method support, but I didn't expect this to have any effect yet.

I copied the code above from some other project and didn't bother to remove the comments and now get warnings.
Is this related to strong mode or default analyzer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onclosed-not-plannedClosed as we don't intend to take action on the reported issuelegacy-area-analyzerUse area-devexp instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions