On Thu, Mar 22, 2012 at 10:25:04PM +0100, Andrej Mitrovic wrote:
> On 3/22/12, H. S. Teoh <hst...@quickfur.ath.cx> wrote:
> > Maybe this needs a ctor?
> 
> Yeah probably. I really don't know when opAssign or the ctor are
> called (especially with more complex types with alias this). Maybe
> someone knows this or it's in the spec but I haven't read about it.

Gah. I tried adding a ctor but it still doesn't work. Compiler
complains:

        Error: Integer constant expression expected instead of "abc"

for AA!(string,int) bb = ["abc":123];

I'm guessing the compiler thinks the literal is an array literal, or
maybe something went awry with the internal AA hacks that it currently
has. So we can't have this nice syntax until druntime/dmd integration.
:-(


T

-- 
Many open minds should be closed for repairs. -- K5 user

Reply via email to