metaborg / stratego

Apache License 2.0
10 stars 6 forks source link

constructor problem occured message hinder #21

Open rvandernoort opened 2 years ago

rvandernoort commented 2 years ago

Spoofax version 16.12/16.13

While writing a new constructor in a signature like AddInt an hindering error popup message appears if you have not finished the line until you write the :. This means that I have to click the popup away for every letter I type in the identifier. After writing the : the error message dissapears.

signature
  constructors
    AddIn  <----- every letter here gives a new popup

Error message of Stratego editor update has encountered a problem:

Stratego editor update for L/chocopy.backend/src/main.str2 failed
Executing task 'stratego.CheckModule(CheckModuleInput(FrontInput.Normal(main), main))' failed unexpectedly

I hope I provided enough info, otherwise dm me on mattermost.

Apanatshka commented 2 years ago

It seems that error recovery by the parsing is adding in some bit of AST that wasn't written. I can reproduce this issue more or less, although I get the error after I write the :. The AST then passed to the type checker is OpDecl("AddIn", DynT(Dyn())). It's definitely a bug in the type checker that the dynamic type is not expected in constructor signatures. I'm not sure if it should be allowed, but the type checker should definitely not crash on it. More on this when I've developed the fix.

rvandernoort commented 2 years ago

I've found another hindering error message, which requires me to restart eclipse, see image. This error occured after opening an spt file with failing tests. However when I press OK the same window reappears every time.

image