Bug 23292 – Import in template ignored during IFTI for eponymous member

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-08-12T20:55:42Z
Last change time
2024-12-13T19:24:09Z
Assigned to
No Owner
Creator
Paul Backus
Moved to GitHub: dmd#20139 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20139 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB