Skip to content

Commit e0cd4b3

Browse files
srujzscommit-bot@chromium.org
authored andcommitted
[pkg:js] Disable JS/Native class conflict check
Bug: #44778 The Native/JS class conflict check breaks user behavior. It should instead be added under a language version to avoid a breakage on SDK update. This CL simply disables the check always so that it can be a simpler cherry-pick for 2.12. Change-Id: I40b0a3a4c46b1442257028c99360ef0ed0b4154c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181440 Reviewed-by: Riley Porter <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]>
1 parent 75a5e77 commit e0cd4b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/_js_interop_checks/lib/js_interop_checks.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class JsInteropChecks extends RecursiveVisitor<void> {
3030
bool _classHasAnonymousAnnotation = false;
3131
bool _libraryHasJSAnnotation = false;
3232
bool _libraryIsGlobalNamespace = false;
33+
// TODO(srujzs): This currently disables this check always. This check should
34+
// instead only be disabled up until a given language version.
35+
bool _disableJSNativeClassConflict = true;
3336

3437
JsInteropChecks(
3538
this._coreTypes, this._diagnosticsReporter, this._nativeClasses);
@@ -83,7 +86,8 @@ class JsInteropChecks extends RecursiveVisitor<void> {
8386
cls.location.file);
8487
}
8588
}
86-
if (_classHasJSAnnotation &&
89+
if (!_disableJSNativeClassConflict &&
90+
_classHasJSAnnotation &&
8791
!_classHasAnonymousAnnotation &&
8892
_libraryIsGlobalNamespace) {
8993
var jsClass = getJSName(cls);

0 commit comments

Comments
 (0)