bmw-software-engineering / trlc

Treat Requirements Like Code
GNU General Public License v3.0
55 stars 9 forks source link

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

Closed markusrosskopf closed 2 weeks ago

markusrosskopf commented 8 months ago

rsl file to reproduce the AssertionError:

package Test3
import 

type T {
  x Common.Item
}
florianschanda commented 4 months ago

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

markusrosskopf commented 2 months ago

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.

christophkloeffel commented 2 weeks ago

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