www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17108] New: Associative array byKeyValue is unsafe

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

          Issue ID: 17108
           Summary: Associative array byKeyValue is unsafe
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: jack jackstouffer.com

void main ()  safe
{
    int[string] aa;
    foreach (val; aa.byKeyValue)
        ++aa[val.key];
}

/d399/f220.d(4): Error:  safe function 'D main' cannot call  system function
'object.byKeyValue!(int[string], string, int).byKeyValue'
/d399/f220.d(4): Error:  safe function 'D main' cannot call  system function
'object.byKeyValue!(int[string], string, int).byKeyValue.Result.empty'
/d399/f220.d(4): Error:  safe function 'D main' cannot call  system function
'object.byKeyValue!(int[string], string, int).byKeyValue.Result.popFront'
/d399/f220.d(5): Error:  safe function 'D main' cannot call  system function
'object.byKeyValue!(int[string], string, int).byKeyValue.Result.front.Pair.key'

--
Jan 19