Bug 7494 – Selective import does not work inside a function

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-13T08:27:00Z
Last change time
2012-06-29T21:48:47Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2012-02-13T08:27:27Z
Test case: ====================== void test7494() { import core.bitop : bsr; // ^ or just any selective import statements bsr(1); } ====================== Compiling with 'dmd -c test.d' gives Error: undefined identifier bsr The error was introduced in commit c022036c8f9fea1672bb2c56edd610715f6335c8 (for fixing bug 314).
Comment #1 by code — 2012-02-13T09:38:05Z
*** Issue 7495 has been marked as a duplicate of this issue. ***
Comment #2 by code — 2012-02-13T09:38:54Z
It's not a regression though. This is 2.057 behavior.
Comment #3 by bugzilla — 2012-02-13T17:59:00Z
Why is this marked as major?
Comment #4 by code — 2012-02-13T18:14:20Z
It was filed as a regression. But it's a regression against 2.058git not against 2.057.
Comment #5 by smjg — 2012-02-14T14:14:09Z
Affects unittests as well. Probably part of the same bug.
Comment #6 by bearophile_hugs — 2012-02-18T12:55:34Z
Now this compiles: void main() { import std.stdio: writeln; } While here it doesn't find writeln(): void main() { import std.stdio: writeln; writeln(1); }
Comment #7 by lovelydear — 2012-04-21T06:07:41Z
*** Issue 7622 has been marked as a duplicate of this issue. ***
Comment #8 by k.hara.pg — 2012-06-07T04:46:01Z
Comment #9 by github-bugzilla — 2012-06-11T11:59:47Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f2c47c247fced50aa01a9e65fc48fc28d623c422 fix Issue 7494 - Selective import does not work inside a function https://github.com/D-Programming-Language/dmd/commit/0c6353c61fe157ff699e5dcc7fa16250b9d3ef67 Merge pull request #990 from 9rnsr/fix7494 Issue 7494 - Selective import does not work inside a function
Comment #10 by k.hara.pg — 2012-06-29T21:48:47Z
*** Issue 8319 has been marked as a duplicate of this issue. ***