Skip to content

Commit 67d39ca

Browse files
srujzsCommit Queue
authored andcommitted
[dart:js_interop] Non-empty @JSExport on class should not be a fatal error
Fixes #61291 Change-Id: I5a5c058cfe46880704912145b2ec98b19127282d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445101 Commit-Queue: Erik Ernst <[email protected]> Auto-Submit: Srujan Gaddam <[email protected]> Reviewed-by: Erik Ernst <[email protected]>
1 parent d46e296 commit 67d39ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/_js_interop_checks/lib/src/transformations/export_checker.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ class ExportChecker {
125125
cls.name.length,
126126
cls.location?.file,
127127
);
128-
exportStatus[cls.reference] = ExportStatus.exportError;
129128
}
130129

131130
_collectOverrides(cls);

tests/lib/js/export/functional_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import 'package:expect/legacy/minitest.dart'; // ignore: deprecated_member_use_f
1111
import 'package:js/js_util.dart';
1212

1313
// Test exporting all vs. only some members.
14-
@JSExport()
14+
// Also test using a non-empty `@JSExport` annotation on a class, which should
15+
// be a warning but should not prevent code generation.
16+
@JSExport('A')
1517
class ExportAll {
1618
ExportAll.constructor();
1719
factory ExportAll.factory() => ExportAll.constructor();

0 commit comments

Comments
 (0)