Re: Compile error using synchronized in ldc (but not dmd)

2013-12-08 Thread Nikhil Padmanabhan
Just a quick follow-up : replacing the array operation by a foreach works around this issue, but I don't understand why it failed in the first place. On Monday, 9 December 2013 at 04:26:01 UTC, Nikhil Padmanabhan wrote: Hello, The following code snippet fails to compile on ldc2 (0.12.1), b

Compile error using synchronized in ldc (but not dmd)

2013-12-08 Thread Nikhil Padmanabhan
Hello, The following code snippet fails to compile on ldc2 (0.12.1), but successfully compiles on dmd 2.064.2 : struct Particle { double x,y,z,w,x2; this(double[] arr) { x = arr[0]; y = arr[1]; z=arr[2]; w=arr[3]; x2 = x*x + y*y + z*z; }