https://d.puremagic.com/issues/show_bug.cgi?id=5685
Denis Shelomovskij <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Summary|Static Arrays as AA indices |[AA] Wrong code & accepted | |incavlid code using static | |array as key type in | |associative array OS/Version|Windows |All --- Comment #1 from Denis Shelomovskij <[email protected]> 2014-03-09 12:28:53 MSK --- This is `accepts-invalid` part of the issue. The following code compiles but shouldn't just like in function call case: --- void main() { int[] a; int[int[1]] aa; const b = a in aa; } --- This is `wrong-code` part of the issue: --- void main() { int[1] a = [2]; int[int[1]] aa; aa[a] = 3; assert([2] in aa); // fails } --- Here `[2]` isn't converted to static array but dynamic array address is passed to `_aaInX` and the treated to be an address of a static array causing undefined behavior. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
