Skip to content

Commit e42e1b3

Browse files
committed
fix: remove redundant module-scope check for Intl alias locale detection
The resolveScope(scope, ...) === moduleScope guard in the module-formatter path compared the *local* alias's declaring scope to moduleScope, so a local const alias of a module-level implicit Intl formatter (e.g. `const f = fmt`) would skip the OCTANE_STRONG_RENDER_LOCALE_FORMAT diagnostic. aliasValue() already follows unreassigned const aliases through the scope chain to recover the original Intl service value, and recordDeclaration already drops reassigned let bindings via isReassigned. The extra scope check was therefore both redundant and harmful—inconsistent with the crypto path that trusts aliasValue alone.
1 parent a39d43d commit e42e1b3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎packages/octane/src/compiler/strong-render-policy.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,7 @@ export function createStrongRenderPolicy({
248248
}
249249
if (moduleFormatters !== 0) {
250250
const alias = aliasValue(member.object, scope);
251-
if (
252-
alias?.kind === 'intl' &&
253-
alias.implicit &&
254-
resolveScope(scope, unwrap(member.object).name) === moduleScope
255-
) {
251+
if (alias?.kind === 'intl' && alias.implicit) {
256252
reportIntl(member, alias, true);
257253
return;
258254
}

0 commit comments

Comments
 (0)