Skip to content

Adjust ddc to consider that private classes can escape via typedefs #45512

@sigmundch

Description

@sigmundch

Since all fields in Dart can be overriden, DDC conservatively generates fields as virtual properties unless it can prove that the field will not be overriden.

Currently it tries to determine if a class is private and will not be overriden. The logic for this takes into consideration local subclasses. See _extensiblePrivateClasses, for example: https://github.com/dart-lang/sdk/blob/master/pkg/dev_compiler/lib/src/kernel/property_model.dart#L46

This needs to be updated to take into consideration the recently added non-function type aliases.

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions