You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (stmtDestroy.getDestroyedObj() instanceofExprThis) {
1852
1852
if (isInConstructor(stmtDestroy)) {
1853
-
stmtDestroy.addError("Cannot destroy 'this' in constructor");
1854
-
return;
1853
+
stmtDestroy.addWarning("Should not destroy 'this' in constructor, because 'new' would return an invalid object.\nMove destruction logic into a separate function outside the constructor.\nThis will be an error in the future.");
0 commit comments