I thought this would be issue #11767, but the error is still there with this code:
---
struct Foo
{
int x[string];
}
struct Bar(alias foo) {} // line 6
enum bar1 = Bar!(Foo(["a": 1]))();
enum bar2 = Bar!(Foo(["a": 1]))(); // line 9
void main() {}
---
bug.d(6): Error: struct test.Bar!(Foo(["a":1])).Bar failed semantic analysis
bug.d(9): Error: template instance test.Bar!(Foo(["a":1])) error instantiating
(In reply to comment #1)
> https://github.com/D-Programming-Language/dmd/pull/3049
I have tested your patch, but now bar1 and bar2 have the same type even if instantiated with two different symbol aliases.
---
void main()
{
struct Foo
{
int x[string];
}
struct Bar(alias foo) {}
enum foo1 = Foo(["a": 1]);
enum foo2 = Foo(["b": -1]);
static assert(!__traits(isSame, foo1, foo2));
enum bar1 = Bar!foo1();
enum bar2 = Bar!foo2();
static assert(is(typeof(bar1) == typeof(bar2)));
}
---
Comment #3 by github-bugzilla — 2013-12-30T06:22:42Z