If I have a NaBL rule like this:

TypeDef(name, cnt):
	defines non-unique Type name
	of param-count cnt

Then two TypeDefs that only differ on param-count, e.g. TypeDef("Func", 1) and TypeDef("Func", 2), result in a single definition "Func" with param-count as a list [1, 2]. This may be intended, but I would expect NaBL to distinguish the two definitions by their properties and not merge them.

I’ve added a project that demonstrates this issue.

I could remove the non-unique keyword here, as that would result in separate definitions, but then I get a Duplicate definition error.

Submitted by D. Pelsmaeker on 27 June 2014 at 13:10
NonUnique.zip27 June 2014 at 13:11

On 27 June 2014 at 13:24 D. Pelsmaeker commented:

If I think about C#, then some properties should be merged and other properties should be distinguished. For example, the class modifiers of a partial C# class are merged:

public partial class X {}
abstract partial class X {}

Is equivalent to:

public abstract class X {}

However, classes (even partial ones) are still distinguished by their generic type arguments. The following are two different classes:

partial class X {}
partial class X<T> {}

So, ideally there should be a way to specify which properties together with the name distinguish a definition and which are merged.

On 27 June 2014 at 13:29 Gabriël Konat commented:

Edit: oops, wrong issue.

Log in to post comments