mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Fixed regression that caused a crash in the presence of the illegal statement import .
. This addresses https://github.com/microsoft/pyright/issues/4778.
This commit is contained in:
parent
425908eced
commit
0997c33577
@ -2531,11 +2531,11 @@ export class Parser {
|
||||
|
||||
const nameParts = importAsNode.module.nameParts.map((p) => p.value);
|
||||
|
||||
if (importAsNode.alias) {
|
||||
if (importAsNode.alias || importAsNode.module.leadingDots > 0) {
|
||||
this._importedModules.push({
|
||||
nameNode: importAsNode.module,
|
||||
leadingDots: importAsNode.module.leadingDots,
|
||||
nameParts: nameParts,
|
||||
nameParts,
|
||||
importedSymbols: undefined,
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user