annotate tests/mini/bug13.d @ 1651:cb960b882ca3 tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
parents 1bb99290e03a
children
rev   line source
lindquist@40 1 module bug13;
lindquist@40 2
lindquist@40 3 void func1(ubyte[4]* arr)
lindquist@40 4 {
lindquist@40 5 ubyte* b = &(*arr)[0];
lindquist@40 6 func2(&(*arr)[1]);
lindquist@40 7 }
lindquist@40 8
lindquist@40 9 void func2(ubyte* ptr)
lindquist@40 10 {
lindquist@40 11 assert(*ptr == 2);
lindquist@40 12 }
lindquist@40 13
lindquist@40 14 void main()
lindquist@40 15 {
lindquist@40 16 ubyte[4] arr = [cast(ubyte)1,2,3,4];
lindquist@40 17 func1(&arr);
lindquist@40 18 }