diff --git a/src/core/demangle.d b/src/core/demangle.d index 22e7e402ac..ae68d22291 100644 --- a/src/core/demangle.d +++ b/src/core/demangle.d @@ -1980,12 +1980,12 @@ version(unittest) template staticIota(int x) { - template Seq(T...){ alias T Seq; } + template Seq(T...){ alias Seq = T; } static if (x == 0) - alias Seq!() staticIota; + alias staticIota = Seq!(); else - alias Seq!(staticIota!(x - 1), x - 1) staticIota; + alias staticIota = Seq!(staticIota!(x - 1), x - 1); } } unittest diff --git a/src/core/memory.d b/src/core/memory.d index 573ed2e8b2..996b9ba802 100644 --- a/src/core/memory.d +++ b/src/core/memory.d @@ -272,7 +272,7 @@ struct GC * size = The size of the block, calculated from base. * attr = Attribute bits set on the memory block. */ - alias BlkInfo_ BlkInfo; + alias BlkInfo = BlkInfo_; /** diff --git a/src/core/thread.d b/src/core/thread.d index 09c04747e8..4f99cbbc31 100644 --- a/src/core/thread.d +++ b/src/core/thread.d @@ -60,11 +60,11 @@ version = StackGrowsDown; */ version(Posix) { - alias core.sys.posix.unistd.getpid getpid; + alias getpid = core.sys.posix.unistd.getpid; } else version (Windows) { - alias core.sys.windows.windows.GetCurrentProcessId getpid; + alias getpid = core.sys.windows.windows.GetCurrentProcessId; } @@ -130,7 +130,7 @@ private version (DigitalMars) { version (Windows) - alias _d_eh_swapContext swapContext; + alias swapContext = _d_eh_swapContext; else { extern(C) void* _d_eh_swapContextDwarf(void* newContext) nothrow @nogc; @@ -169,7 +169,7 @@ private } } else - alias _d_eh_swapContext swapContext; + alias swapContext = _d_eh_swapContext; } @@ -187,7 +187,7 @@ version( Windows ) import core.sys.windows.windows; import core.sys.windows.threadaux; // for OpenThreadHandle - extern (Windows) alias uint function(void*) btex_fptr; + extern (Windows) alias btex_fptr = uint function(void*); extern (C) uintptr_t _beginthreadex(void*, uint, btex_fptr, void*, uint, uint*) nothrow; // @@ -1443,11 +1443,11 @@ private: // version( Windows ) { - alias uint TLSKey; + alias TLSKey = uint; } else version( Posix ) { - alias pthread_key_t TLSKey; + alias TLSKey = pthread_key_t; } @@ -2822,8 +2822,8 @@ enum ScanType tls, /// TLS data is being scanned. } -alias void delegate(void*, void*) nothrow ScanAllThreadsFn; /// The scanning function. -alias void delegate(ScanType, void*, void*) nothrow ScanAllThreadsTypeFn; /// ditto +alias ScanAllThreadsFn = void delegate(void*, void*) nothrow; /// The scanning function. +alias ScanAllThreadsTypeFn = void delegate(ScanType, void*, void*) nothrow; /// ditto /** * The main entry point for garbage collection. The supplied delegate @@ -3114,7 +3114,7 @@ enum IsMarked : int unknown, /// Address is not managed by the GC. } -alias int delegate( void* addr ) nothrow IsMarkedDg; /// The isMarked callback function. +alias IsMarkedDg = int delegate( void* addr ) nothrow; /// The isMarked callback function. /** * This routine allows the runtime to process any special per-thread handling @@ -4617,7 +4617,7 @@ private: // Thus, it should not have any effects on OSes not implementing // exception chain verification. - alias void function() fp_t; // Actual signature not relevant. + alias fp_t = void function(); // Actual signature not relevant. static struct EXCEPTION_REGISTRATION { EXCEPTION_REGISTRATION* next; // sehChainEnd if last one. diff --git a/src/object.d b/src/object.d index 0458bce47a..d4725e0764 100644 --- a/src/object.d +++ b/src/object.d @@ -24,23 +24,23 @@ private version(D_LP64) { - alias ulong size_t; - alias long ptrdiff_t; + alias size_t = ulong; + alias ptrdiff_t = long; } else { - alias uint size_t; - alias int ptrdiff_t; + alias size_t = uint; + alias ptrdiff_t = int; } -alias ptrdiff_t sizediff_t; //For backwards compatibility only. +alias sizediff_t = ptrdiff_t; //For backwards compatibility only. -alias size_t hash_t; //For backwards compatibility only. -alias bool equals_t; //For backwards compatibility only. +alias hash_t = size_t; //For backwards compatibility only. +alias equals_t = bool; //For backwards compatibility only. -alias immutable(char)[] string; -alias immutable(wchar)[] wstring; -alias immutable(dchar)[] dstring; +alias string = immutable(char)[]; +alias wstring = immutable(wchar)[]; +alias dstring = immutable(dchar)[]; version (D_ObjectiveC) public import core.attribute : selector; @@ -827,7 +827,7 @@ class TypeInfo_Delegate : TypeInfo override @property size_t tsize() nothrow pure const { - alias int delegate() dg; + alias dg = int delegate(); return dg.sizeof; } @@ -843,7 +843,7 @@ class TypeInfo_Delegate : TypeInfo override @property size_t talign() nothrow pure const { - alias int delegate() dg; + alias dg = int delegate(); return dg.alignof; } @@ -1027,7 +1027,7 @@ class TypeInfo_Class : TypeInfo } } -alias TypeInfo_Class ClassInfo; +alias ClassInfo = TypeInfo_Class; unittest {