Skip to content

Analyzer allows non-generative constructor forwarding #38306

@fishythefish

Description

@fishythefish
class Mixin {}

class Base {
  Base();
  factory Base.f() = Base;
}

class Sub = Base with Mixin;

void main() {
  Sub.f();
}

This should be a compile-time error since the f constructor is non-generative and should not be forwarded. Analyzer fails to report an error here.

Metadata

Metadata

Assignees

Labels

legacy-area-analyzerUse area-devexp instead.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