Skip to content

[ddc] Missing dynamic checks on getter invocations when getter returns dynamic from a type argument #60643

Open
@nshahan

Description

@nshahan

This code does not throw any errors:

class C {
  List<dynamic> get fn => [
    (int i, {required String s}) {
      return 'hello world';
    },
  ];
}

void main() {
  var c = C();
  c.fn.single();

The compiled code is invoking the closure returned from .single without any checks.

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions