Bug 12973 – Local import std.math for exponentiation gives undefined identifier "std"
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-23T22:54:00Z
Last change time
2014-06-27T04:01:01Z
Keywords
rejects-valid
Assigned to
nobody
Creator
safety0ff.bugz
Comments
Comment #0 by safety0ff.bugz — 2014-06-23T22:54:54Z
I was in the process of preparing a different bug report, and I found this bug.
Global scope import works though.
// CODE:
void main()
{
import std.math;
ulong three = 3uL;
// next line gives: Error: undefined identifier 'std'
assert(three^^40uL == 12157665459056928801uL);
}
Comment #1 by bearophile_hugs — 2014-06-24T08:27:11Z
What compiler version and OS are you using? With the latest dmd alpha it doesn't show me this error since lot of time.
Comment #2 by safety0ff.bugz — 2014-06-27T04:01:01Z
Seems like it was a bug from an old git version, closing.