[Issue 8557] New: AA error with string[string][]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 18 01:45:57 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8557

           Summary: AA error with string[string][]
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: 10equals2 at gmail.com


--- Comment #0 from 1100110 <10equals2 at gmail.com> 2012-08-18 01:45:53 PDT ---
string[string][]       Dict;    //sure ok.
alias string[string][] dict;    //Error
void main()
{
    Dict                   = [["Cow":"moo" ],["Duck":"quack"]];//cool
    Dict                  ~=  ["Dog":"woof"];                   //No prob.
assert(Dict==[["Cow":"moo"],["Duck":"quack"],["Dog":"woof"]]);//looks legit
    //dict temp              = [["Cow":"moo" ],["Duck":"quack"]];//Error
    //string[string][] temp2 = [["Cow":"moo" ],["Duck":"quack"]];//Error


    //And My favorite one of all:
    //auto temp2 = [["Cow":"moo"],["Duck":"quack"]];  //Error
    auto temp3 = tuple([["Cow":"moo"]]);//works. Variant as well.
}

With everything commented out, Dict works just fine from way up there.
But Tuple, Variant, tls,
Those are the only way to get this to work.

The specific error it gives is:
Error: Integer constant expected instead of "Cow"

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list