Bug 22482 – imported package shadow local variable

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-11-05T02:54:51Z
Last change time
2024-12-13T19:19:06Z
Assigned to
No Owner
Creator
deadalnix
Moved to GitHub: dmd#20002 →

Comments

Comment #0 by deadalnix — 2021-11-05T02:54:51Z
void foo(C)(ref C config) { // Do stuff import config.somemodule; config.extends(bar()); } Gives: Error: undefined identifier `extends` in package `config` This does not sound reasonable to me. The package should not take precedence over local variable.
Comment #1 by robert.schadek — 2024-12-13T19:19:06Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20002 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB