Bug 13814 – renamed selective import (alias) don't work with eponymous template

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-04T00:28:46Z
Last change time
2024-12-13T18:38:02Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#18920 →

Comments

Comment #0 by code — 2014-12-04T00:28:46Z
cat > bug.d << CODE module bug; void func(string) {} template ng() { // renamed selective import isn't a "real" alias import bug : ng = func; } template ok() { import bug : func; // real alias works alias ok = func; } void test() { ok("works"); ng("doesn't work"); } CODE dmd -c bug ---- bug.d(21): Error: template bug.ng cannot deduce function from argument types !()(string), candidates are: bug.d(5): bug.ng()
Comment #1 by code — 2014-12-04T00:30:51Z
Selective imports that aren't renamed don't work either. cat > bug.d << CODE template format() { import std.string : format; } void test() { format(""); } CODE dmd -c bug.d
Comment #2 by robert.schadek — 2024-12-13T18:38:02Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18920 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB