trlc icon indicating copy to clipboard operation
trlc copied to clipboard

AssertionError for empty 'imports' list in CU when 'is_visible' is called during parsing

Open markusrosskopf opened this issue 2 years ago • 2 comments

rsl file to reproduce the AssertionError:

package Test3
import 

type T {
  x Common.Item
}

markusrosskopf avatar Jan 31 '24 09:01 markusrosskopf

Can you provide a bit more to reproduce this please? I assume this is API related?

florianschanda avatar May 18 '24 13:05 florianschanda

Hi @florianschanda, when the method is_visible is called while the import keyword is not followed by a name, leaving self.imports empty, the assert statement is triggered. Shouldn't we print an error here instead? Probably not a bug, but maybe too harsh to blow up. This is particularly crucial when parsing occurs with every keystroke through the VS Code extension.

markusrosskopf avatar Jul 16 '24 07:07 markusrosskopf

I am not able to reproduce this issue. So I would argue closing this issue

christophkloeffel avatar Sep 11 '24 11:09 christophkloeffel