@@ -150,7 +150,7 @@ package:
150150// TODO: right now, virtual functions on specialized classes can be called with base classes as 'self', not safe!
151151extern (C ) int methodWrapper(M, T, bool virtual)(lua_State* L)
152152{
153- alias ParameterTypeTuple! M Args ;
153+ alias Args = ParameterTypeTuple! M;
154154
155155 static assert ((variadicFunctionStyle! M != Variadic.d && variadicFunctionStyle! M != Variadic.c),
156156 " Non-typesafe variadic functions are not supported." );
@@ -175,9 +175,9 @@ extern(C) int methodWrapper(M, T, bool virtual)(lua_State* L)
175175 {
176176 alias RT = ReturnType! M;
177177 static if (returnsRef! M && isUserStruct! RT )
178- alias ref RT function (T, Args) VirtualWrapper ;
178+ alias VirtualWrapper = ref RT function (T, Args);
179179 else
180- alias RT function (T, Args) VirtualWrapper ;
180+ alias VirtualWrapper = RT function (T, Args);
181181 VirtualWrapper func = cast (VirtualWrapper)lua_touserdata(L, lua_upvalueindex(1 ));
182182 }
183183 else
@@ -195,14 +195,14 @@ extern(C) int methodWrapper(M, T, bool virtual)(lua_State* L)
195195 {
196196 TreatArgs! (ParameterTypeTuple! VirtualWrapper) allArgs;
197197 allArgs[0 ] = self;
198- alias allArgs[1 .. $] args ;
198+ alias args = allArgs[1 .. $];
199199 }
200200 else
201201 {
202202 // TODO: maybe we should build a tuple of 'ReturnType!(getArgument!(T, i))' for each arg?
203203 // then we could get rid of this TreatArgs! rubbish...
204204 TreatArgs! Args allArgs;
205- alias allArgs args;
205+ alias args = allArgs ;
206206 }
207207
208208 foreach (i, Arg; Args)
@@ -213,7 +213,7 @@ extern(C) int methodWrapper(M, T, bool virtual)(lua_State* L)
213213
214214extern (C ) int functionWrapper(T)(lua_State* L)
215215{
216- alias FillableParameterTypeTuple! T Args ;
216+ alias Args = FillableParameterTypeTuple! T;
217217
218218 static assert ((variadicFunctionStyle! T != Variadic.d && variadicFunctionStyle! T != Variadic.c),
219219 " Non-typesafe variadic functions are not supported." );
@@ -271,7 +271,7 @@ void pushFunction(T)(lua_State* L, T func) if (isSomeFunction!T)
271271// TODO: optimize for non-virtual functions
272272void pushMethod (T, string member)(lua_State* L) if (isSomeFunction! (__traits(getMember, T, member)))
273273{
274- alias typeof (mixin (" &T.init." ~ member)) M ;
274+ alias M = typeof (mixin (" &T.init." ~ member));
275275
276276 enum isVirtual = ! is (T == struct ); // TODO: final methods should also be handled...
277277
0 commit comments