[Issue 17859] New: importing the same`mixin template` results in `isn't a template` error instead of the expected `conflicts with alias` error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 26 13:07:03 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17859
Issue ID: 17859
Summary: importing the same`mixin template` results in `isn't a
template` error instead of the expected `conflicts
with alias` error
Product: D
Version: D2
Hardware: x86_64
OS: Mac OS X
Status: NEW
Keywords: industry
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: or at weka.io
a.d:
-----------------
module a;
mixin template A(T) {
struct A {
T t;
}
}
struct X {
int a;
}
-----------------
b.d:
-----------------
module b;
import a: A;
import a: A;
mixin A!int;
import a: X;
import a: X;
X x;
-----------------
running `dmd -o- a.d b.d`:
b.d(4): Error: mixin b.A!int A isn't a template
b.d(7): Error: alias b.X conflicts with alias b.X at b.d(6)
I would expect the error for `A` will be the same error I get on `X`
--
More information about the Digitalmars-d-bugs
mailing list