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
When printing a modified AST, after removing one import specifier and inserting another one with different imported and local specifiers, the local identifier is ignored.
Original statement:
import{parse,print}from"fast-nls"
Desired statement:
import{loadas$loadMessages$,print}from"fast-nls"
Obtained statement:
import{$loadMessages$,print}from"fast-nls"
The imported identifier load is missing.
Details
Let us remove the parse specifier and insert load as $loadMessages$:
It appears, that if the count of import specifiers does not change, the presence of imported and local identifiers is not checked. If original import specifiers did not contain different imported and local identifiers, the newly inserted ones at the position of previous ones will be printed with local identifiers only.
The text was updated successfully, but these errors were encountered:
When printing a modified AST, after removing one import specifier and inserting another one with different imported and local specifiers, the local identifier is ignored.
Original statement:
Desired statement:
Obtained statement:
The imported identifier
load
is missing.Details
Let us remove the
parse
specifier and insertload as $loadMessages$
:Result:
The imported identifier
load
was not included in the printed code.When omitting the removal of
parse
:let { specifiers } = ast.program.body[0] - specifiers.splice(0, 1)
The new import specifier becomes complete:
It appears, that if the count of import specifiers does not change, the presence of imported and local identifiers is not checked. If original import specifiers did not contain different imported and local identifiers, the newly inserted ones at the position of previous ones will be printed with local identifiers only.
The text was updated successfully, but these errors were encountered: