In Spoofax 1.2, the execution order of error collection and post-name-analysis-trans is sudden switched.

For example, create a new Entity project and change the analysis interfaces:

analysis-single-default-interface = 
  analysis-single-default(id, post-trans, id|<language>)
analysis-multiple-default-interface = 
  analysis-multiple-default(parse-file <+ !(), post-trans, id, id|<language>, <project-path>)

post-trans:
  Module(m, _) -> Module(m, [])

Now, the analyzed AST does not contain any entities.

Then add the following constraint to check.str:

nabl-constraint(|ctx):
  Entity(e, _) -> <fail>
  where
    failtask := <task-create-fail(|ctx)>;
    <task-create-error-on-failure(|ctx, failtask, "Not expected")> e

Because the analyzed AST does not contain any entities, you wouldn’t expect the error to show up for any instance. However, it does (but previously didn’t).

Submitted by Oskar van Rest on 15 October 2014 at 03:08

On 4 November 2014 at 15:16 Gabriël Konat tagged 1.3

On 4 November 2014 at 15:19 Gabriël Konat tagged @gohla

On 7 November 2014 at 15:38 Gabriël Konat removed tag 1.3

On 7 November 2014 at 15:38 Gabriël Konat tagged 1.3.1

On 21 November 2014 at 14:09 Gabriël Konat removed tag 1.3.1

Log in to post comments