D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21411 - import in eponymous IFTI does not work correctly
Summary: import in eponymous IFTI does not work correctly
Status: RESOLVED DUPLICATE of issue 13737
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-21 04:44 UTC by Adam D. Ruppe
Modified: 2021-02-21 05:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Adam D. Ruppe 2020-11-21 04:44:16 UTC
Seems similar to but distinct from https://issues.dlang.org/show_bug.cgi?id=6501


--- bugz.d

template bug() {
        import bugz2;
        void bug(S) {}
}

void main() {
        import bugz2;
        bug(S());
}

--- bugz2.d

struct S {}

---


bugz.d(4): Error: undefined identifier S
bugz.d(9): Error: template bugz.bug cannot deduce function from argument types
()(S), candidates are:
bugz.d(2):        bug()(S)


DMD64 D Compiler v2.094.0-beta.1



Note that if it isn't IFTI - use `bug!()(S());` or any other form of explicit instantiation - then it is fine.
Comment 1 Boris Carvajal 2021-02-21 05:43:50 UTC

*** This issue has been marked as a duplicate of issue 13737 ***