Bug 919 – auto type inference with nested arrays

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-02-01T18:56:00Z
Last change time
2014-02-16T15:25:22Z
Assigned to
bugzilla
Creator
wbaxter

Comments

Comment #0 by wbaxter — 2007-02-01T18:56:37Z
Two issues here. I'm guessing they're related so filing jointly. Issue 1: This won't compile: ------- void main() { auto foo = [[1.0],[2.0]]; } ------- "Error: cannot implicitly convert expression ([[1],[2]]) of type double[][2] to double" Issue 2: This will compile: ---- import std.stdio; auto foo = [[1.0],[2.0]]; void main() { writefln(foo); } ---- But it generates a runtime exception after printing the opening '[': "[Error: Access Violation"
Comment #1 by smjg — 2007-09-27T16:36:11Z
*** This bug has been marked as a duplicate of 999 ***