www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17859] New: importing the same`mixin template` results in


          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 puremagic.com
          Reporter: or weka.io

module a;

mixin template A(T) {
    struct A {
        T t;

struct X {
    int a;

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`

Sep 26 2017