# HG changeset patch # User Aziz K?ksal # Date 1216507200 -7200 # Node ID aad6aeb5d12b4a4046b968a314eb8529c2a3dd31 # Parent 55c463c57d3a2ea1b47f6c47a7268ce8409e7f29 Fixed string mixin of static array. (Diagnosed by Jarrett.) diff -r 55c463c57d3a -r aad6aeb5d12b src/dil/ast/Visitor.d --- a/src/dil/ast/Visitor.d Tue Jul 01 22:52:54 2008 +0200 +++ b/src/dil/ast/Visitor.d Sun Jul 20 00:40:00 2008 +0200 @@ -100,9 +100,13 @@ static mixin(generateDispatchFunctions()); + // This is necessary so that the compiler puts + // the array into the static data segment. + mixin("private const _dispatch_vtable = " ~ generateVTable() ~ ";"); /// The table holding function pointers to the second dispatch functions. - static const void*[] dispatch_vtable = mixin(generateVTable()); - static assert(dispatch_vtable.length == g_classNames.length, "vtable length doesn't match number of classes"); + static const dispatch_vtable = _dispatch_vtable; + static assert(dispatch_vtable.length == g_classNames.length, + "vtable length doesn't match number of classes"); /// Looks up the second dispatch function for n and returns that. Node function(Visitor, Node) getDispatchFunction()(Node n)