Skip to content

interceptor is treeshaken over-aggressively #11600

Closed
@vsmenon

Description

@vsmenon

The following program:

  void foo() {}

  main() {
    print(foo is Function);
  }

prints "true" on the VM but generates the following error with dart2js:

Uncaught TypeError: Object [object Object] has no method 'getInterceptor'

Adding some explicit dispatch on foo makes the program run correctly. It appears that the is check alone isn't sufficient to keep getInterceptor around but should be.

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresweb-dart2js

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions