November 13, 2022
https://issues.dlang.org/show_bug.cgi?id=23482

          Issue ID: 23482
           Summary: "template instance is not a template declaration, it
                    is a function alias" when template is in a different
                    module
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: andy.pj.hanson@gmail.com

This requires two files to reproduce.

a.d:
```
import b : foo;

void foo(char) {}

void main() {
        foo!"a"(1);
}
```

b.d:
```
module b;

void foo(int[]) {}
void foo(string s)(int) {}
```

The error is:
```
a.d(6): Error: template instance `foo!"a"` `foo` is not a template declaration,
it is a function alias
```


There is no error if I remove either `void foo(char) {}` or `void foo(int[])
{}`. There is also no error if I move the contents of `b.d` into `a.d`.

--