www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12973] New: Local import std.math for exponentiation gives

https://issues.dlang.org/show_bug.cgi?id=12973

          Issue ID: 12973
           Summary: Local import std.math for exponentiation gives
                    undefined identifier "std"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: safety0ff.bugz gmail.com

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);
}

--
Jun 23 2014