pull/16515/head
ComputerGuy 1 month ago
parent 8f3924177a
commit 7f47f86d5a

@ -2,7 +2,7 @@
/** @import { Context } from '../types' */
import { dev, is_ignored } from '../../../../state.js';
import * as b from '#compiler/builders';
import { get_rune } from '../../../scope.js';
import { get_rune, UNKNOWN } from '../../../scope.js';
import { transform_inspect_rune } from '../../utils.js';
import { should_proxy } from '../utils.js';
@ -82,7 +82,9 @@ export function CallExpression(node, context) {
['debug', 'dir', 'error', 'group', 'groupCollapsed', 'info', 'log', 'trace', 'warn'].includes(
node.callee.property.name
) &&
node.arguments.some((arg) => arg.type === 'SpreadElement' || !context.state.scope.evaluate(arg).is_known)
node.arguments.some(
(arg) => arg.type === 'SpreadElement' || !context.state.scope.evaluate(arg).values.has(UNKNOWN)
)
) {
return b.call(
node.callee,

@ -16,7 +16,7 @@ import { is_reserved, is_rune } from '../../utils.js';
import { determine_slot } from '../utils/slot.js';
import { validate_identifier_name } from './2-analyze/visitors/shared/utils.js';
const UNKNOWN = Symbol('unknown');
export const UNKNOWN = Symbol('unknown');
/** Includes `BigInt` */
const NUMBER = Symbol('number');
const STRING = Symbol('string');

Loading…
Cancel
Save