← Back to index
|
Original Bugzilla link
Bug 7895 – Internal compiler error
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-12T16:46:00Z
Last change time
2012-04-21T11:40:09Z
Assigned to
nobody
Creator
turkeyman
Comments
Comment #0
by turkeyman — 2012-04-12T16:46:26Z
module remedy.math.matrix; struct Vector4 { float x = 0.0f; float y = 0.0f; float z = 0.0f; float w = 0.0f; static immutable zero = Vector4( 0.0f, 0.0f, 0.0f, 0.0f ); static immutable one = Vector4( 1.0f, 1.0f, 1.0f, 1.0f ); static immutable right = Vector4( 1.0f, 0.0f, 0.0f, 0.0f ); static immutable up = Vector4( 0.0f, 1.0f, 0.0f, 0.0f ); static immutable forward = Vector4( 0.0f, 0.0f, 1.0f, 0.0f ); static immutable origin = Vector4( 0.0f, 0.0f, 0.0f, 0.0f ); static immutable identity = Vector4( 0.0f, 0.0f, 0.0f, 1.0f ); } struct Matrix4 { union { struct { Vector4 x = Vector4.right; Vector4 y = Vector4.up; Vector4 z = Vector4.forward; Vector4 t = Vector4.zero; } float[16] m; Vector4[4] v; } static immutable Matrix4 identity = Matrix4.init; } The final line causes the error: static immutable Matrix4 identity = Matrix4.init; Remove the initialisation ( = Matrix4.init), and it works fine.
Comment #1
by lovelydear — 2012-04-21T11:27:42Z
This compiles fine on dmd 2.059 Win32.
Comment #2
by turkeyman — 2012-04-21T11:40:09Z
So it does. Resolved :)