Cryptic Error message with scope(failure) and AA

Anthony Goins neontotem at gmail.com
Sat Jun 29 13:45:11 PDT 2013


Is this known?
I've heard there are many problems with associative arrays.

dmd 2.063

---
module scopefailtest;

int[char] AAarray;

void main(string[] args)
{
      AAarray = ['a':1, 'b':2, 'c':3];
      foreach(aa; AAarray)
      {
           scope(failure)continue;
           aa = 32;
      }
}
---

dmd output
Error: cannot implicitly convert expression (0) of type int to 
void


Works without scope(failure)
Works with non Associative Array

No helpful description.
No file or line number.
Very hard to find.


More information about the Digitalmars-d-learn mailing list