Comment #0 by snarwin+bugzilla — 2022-08-12T20:55:42Z
As of DMD 2.100.0, the following example program fails to compile
--- lib.d
module lib;
struct S {}
--- app.d
module app;
template fun()
{
import lib;
void fun(S) {}
}
void main()
{
import lib;
S s;
fun(s);
}
---
The error message is:
---
app.d(6): Error: undefined identifier `S`
app.d(13): Error: none of the overloads of template `app.fun` are callable using argument types `!()(S)`
app.d(3): Candidate is: `fun()(S)`
---
If the call expression `fun(s)` is changed to `fun!()(s)`, the program compiles successfully.
Comment #1 by robert.schadek — 2024-12-13T19:24:09Z