Bug 23482 – "template instance is not a template declaration, it is a function alias" when template is in a different module

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-11-13T17:30:54Z
Last change time
2024-12-13T19:25:41Z
Assigned to
No Owner
Creator
andy-hanson
Moved to GitHub: dmd#18135 →

Comments

Comment #0 by andy-hanson — 2022-11-13T17:30:54Z
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`.
Comment #1 by robert.schadek — 2024-12-13T19:25:41Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18135 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB