-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dart2wasm]: Unexpected type StructuralParameterType StructuralParameterType(T). #59989
Comments
Dart 3.6.0 (stable) (Thu Dec 5 07:46:24 2024 -0800) on "windows_x64". |
Summary: |
Compiles with |
cc @alexmarkov |
Same with |
TFA crashes as it doesn't support However, I'm not sure how to create an example of such @ykmnkmi Could you try to reduce your app to a small example which would still crash the compiler? |
@alexmarkov wokring on it. |
import 'dart:js_interop';
import 'package:web/web.dart';
void main() {
void handler<T extends Event>(Element element, T event) {
print(element == event.currentTarget);
}
// throws
// JSExportedDartFunction jsHandler = handler.toJSCaptureThis;
// works
JSExportedDartFunction jsHandler = handler<MouseEvent>.toJSCaptureThis;
document.body!.addEventListener('click', jsHandler);
} |
Chances are, it's a CFE issue. I've updated the labels accordingly. |
Got this error and don't know which
as
throws:The text was updated successfully, but these errors were encountered: