implicit conversions between array and pointer

Jarrett Billingsley kb3ctd2 at yahoo.com
Sat Apr 26 05:37:57 PDT 2008


"terranium" <terranium at yandex.ru> wrote in message 
news:futcip$peg$1 at digitalmars.com...
> int* p;
> int[] a=[1,2,3];
> p=a;
>
> spec says it should compile, but it won't. Where is the bug - in spec or 
> in compiler.

You must be looking at a terribly out-of-date spec.

http://www.digitalmars.com/d/1.0/arrays.html

See the "Implicit conversions" section.  As was mentioned, implicit 
conversion from T[] to T* was removed more than a year ago. 





More information about the Digitalmars-d mailing list