[Issue 919] New: auto type inference with nested arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 1 16:56:43 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=919

           Summary: auto type inference with nested arrays
           Product: D
           Version: 1.004
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: wbaxter at gmail.com


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"


-- 



More information about the Digitalmars-d-bugs mailing list