module b;
void foo() {}
----
module a;
import b;
void foo(T)(T a) {}
alias foo = b.foo;
void main()
{
foo();
foo(1);
}
----
a.d(6): Error: alias `a.foo` conflicts with template `a.foo(T)(T a)` at a.d(5)
The test case compiles if the alias declaration preceeds the template declaration.
Comment #1 by maxsamukha — 2024-09-10T19:18:24Z
Another manifestation of likely the same bug:
module a;
import std.range.primitives;
ref T front(T)(T* range) => range[0];
alias front = std.range.primitives.front;
void main()
{
}
----
a.d(6): Deprecation: package std.range is not accessible here, perhaps add 'static import std.range;'
a.d(6): Deprecation: module std.range.primitives is not accessible here, perhaps add 'static import std.range.primitives;'
a.d(6): Deprecation: package std.range is not accessible here, perhaps add 'static import std.range;'
a.d(6): Deprecation: module std.range.primitives is not accessible here, perhaps add 'static import std.range.primitives;'
Comment #2 by robert.schadek — 2024-12-13T19:37:20Z