The default error message appears only if the declaration happens in some scope. For example the following code:

  Proc foo(G1 : Graph) {
    Node n;
    Node n;
  }

If analysed in the following NaBL rules produces no messages:

  Decl(t, [var], _):
    defines 
      Variable var
        of type t
        of graph g
      where
        t has graph g

However, if the declaration is scoped the hiding message appears:

  Decl(t, [var], _):
    defines 
      Variable var
        of type t
        of graph g
      in subsequent scope
      where
        t has graph g
Submitted by Vlad Vergu on 3 December 2013 at 22:49

On 4 December 2013 at 00:07 Gabriël Konat commented:

Using the first NaBL rules, it should produce a duplicate definition error, do you get that?


On 4 December 2013 at 00:09 Vlad Vergu commented:

No, but i might have turned that off. What’s the strategy name i should look for?


On 4 December 2013 at 00:10 Gabriël Konat commented:

nabl-check-disable-duplicate(|uri, ns)


On 4 December 2013 at 00:12 Vlad Vergu commented:

Oh yes. You’re right, duplicate definitions are off. I’m changing the type of the issue to question and closing. Although a Q&A section covering this would be nice.


On 4 December 2013 at 00:13 Vlad Vergu tagged question

On 4 December 2013 at 00:13 Vlad Vergu removed tag error

On 4 December 2013 at 00:13 Vlad Vergu closed this issue.

Log in to post comments