Skip to content

Missing error when constructing deleted classes #60209

Open
@nshahan

Description

@nshahan

Classes should not be usable after a hot reload that deletes them.

Generation 0:

class A {}

var retained;

void helper() {
  retained = () {
    var a = A();
    print(a);
  };
retained();
}

Generation 1:

var retained;

void helper() {
  retained();  // <-- Should throw an error
}

Unclear what type of error this should be.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compilerweb-hot-reloadIssues related to stateful hot reload on the web

Type

No type

Projects

Status

Blocked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions