Skip to content

[js_interop] No error if a mixin is annotated with @JS, @anonymous, or @staticInterop #61125

@srujzs

Description

@srujzs

It isn't quite clear what we should do in this case. In some cases, it may silently work, and in other cases it looks like it fails horrifically e.g.

import 'package:js/js.dart';

@JS()
external void eval(String code);

@JS()
mixin M {
}

class S with M {}

void main() {
}

We haven't really designed older interop around mixins. We should warn against this and make sure we don't treat it as a JS interop type in our transformer.

Note that this is true with the dart:js_interop annotations as well.

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-js-interopIssues that impact all js interop

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions