Skip to content

Type parameter highlight doesn't trigger on declaration #60449

@FMorschel

Description

@FMorschel

Repro:

/// This is a comment that references [ThisType]
extension <ThisType> on ThisType {
  ThisType foo() {
    return this;
  }
}

/// This is a comment that references [ThisType]
extension type Et<ThisType>(ThisType value) {
  ThisType get v => value;
}

/// This is a comment that references [ThisType]
mixin M<ThisType> {
  ThisType get t;
}

/// This is a comment that references [ThisType]
abstract class C<ThisType> {
  ThisType get t;
}

/// This is a comment that references [ThisType]
enum E<ThisType> {
  a;

  ThisType get t => throw UnimplementedError();
}

/// This is a comment that references [ThisType]
void foo<ThisType>() {
  ThisType? t;
}

Image

Image

Image

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions