array<string> foo = { 'a', 'b', 'c' };
dictionary d1 = { {'arr', foo} };
array<string>@ s1 = array<string>@(d1['arr']);
//print(s1[0]); // index out of bounds exception
dictionary@ d2 = @d1;
array<string>@ s2 = array<string>@(d2['arr']); <-- segfaults with the below backtrace:
(gdb) bt
#0 0x005ee375 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#1 0x090ac582 in endcopy8 () at AngelScript/source/as_callfunc_x86.cpp:515
#2 0x090acdee in CallSystemFunctionNative (context=0xd4c1a04, descr=0xac563b4, obj=0xd4ef560, args=<optimized out>, retPointer=0x0) at AngelScript/source/as_callfunc_x86.cpp:262
#3 0x090abf20 in CallSystemFunction (id=59, context=0xd4c1a04, objectPointer=0x0) at AngelScript/source/as_callfunc.cpp:604
#4 0x09069251 in asCContext::ExecuteNext (this=0xd4c1a04) at AngelScript/source/as_context.cpp:2404
#5 0x09069d10 in asCContext::Execute (this=0xd4c1a04) at AngelScript/source/as_context.cpp:1227
This is 32-bit linux on revision 1985 (Version 2.29.2 WIP - 2014/07/21)
Is there anything 'wrong' with the above syntax (beyond being a weird way to do it)? Anything that might be done to make it a compiler error or a runtime exception?
Thank you!