Mercurial > projects > dil
changeset 830:aad6aeb5d12b
Fixed string mixin of static array. (Diagnosed by Jarrett.)
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sun, 20 Jul 2008 00:40:00 +0200 |
parents | 55c463c57d3a |
children | c60bd5cd61da |
files | src/dil/ast/Visitor.d |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)