D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17859 - importing the same`mixin template` results in `isn't a template` error instead of the expected `conflicts with alias` error
Summary: importing the same`mixin template` results in `isn't a template` error instea...
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Mac OS X
: P3 minor
Assignee: No Owner
URL:
Keywords: industry
Depends on:
Blocks:
 
Reported: 2017-09-26 13:07 UTC by or
Modified: 2024-12-13 18:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description or 2017-09-26 13:07:03 UTC
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`
Comment 1 dlangBugzillaToGithub 2024-12-13 18:54:41 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19322

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB