Skip to content

Linter fails to detect invalid shorthand syntax on instance methods #61954

@huanghui1998hhh

Description

@huanghui1998hhh
void main() {
  final A a = .copy(); // linter doesn't report error
}

class A {
  A copy() => A();
}

Maybe should fail at analysis time rather than at compilation.

Metadata

Metadata

Assignees

Labels

area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.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