November 30, 2010 [Issue 5292] New: Associative array with fixed sized array as value issues a Range violation when inserting new value | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5292 Summary: Associative array with fixed sized array as value issues a Range violation when inserting new value Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: druntime AssignedTo: sean@invisibleduck.org ReportedBy: chatelet.guillaume@gmail.com --- Comment #0 from Guillaume Chatelet <chatelet.guillaume@gmail.com> 2010-11-30 15:17:14 PST --- Hi, I'm new to D so this might not be a bug but something I misunderstood about the language. I want to make an associative array of fixed sized array with double as key type. The following code compiles int[2][double] map; map[0] = [1,2]; but fails at runtime with a "Range violation" Surprisingly enough, the following code also compiles ?! int[1][double] map; map[0] = [1,2,3,4,5]; but fails alike at runtime. It looks like the good way to do this is to use int[][double] map; map[0] = [1,2,3,4,5]; But then relaxing the type constraint... Any ideas ? I'm using Digital Mars D Compiler v2.050 on linux x86. Best regards, Guillaume CHATELET -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 23, 2011 [Issue 5292] Associative array with fixed sized array as value issues a Range violation when inserting new value | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | http://d.puremagic.com/issues/show_bug.cgi?id=5292 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug@yahoo.com.au Resolution| |DUPLICATE --- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-01-23 12:52:24 PST --- This is a duplicate of a very old and serious bug, which will be fixed in the next release. *** This issue has been marked as a duplicate of issue 1899 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation