diff --git a/VERSION b/VERSION index 1d4e52fdf810..ffc1c3e86dfa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.109.1-rc.1 +v2.109.1 diff --git a/compiler/src/dmd/semantic2.d b/compiler/src/dmd/semantic2.d index e2656ade2e85..06a5eef47bf1 100644 --- a/compiler/src/dmd/semantic2.d +++ b/compiler/src/dmd/semantic2.d @@ -888,4 +888,11 @@ private extern(C++) final class StaticAAVisitor : SemanticTimeTransitiveVisitor aaExp.lowering = loweredExp; } + + // https://issues.dlang.org/show_bug.cgi?id=24602 + // TODO: Is this intionally not visited by SemanticTimeTransitiveVisitor? + override void visit(ClassReferenceExp crExp) + { + this.visit(crExp.value); + } } diff --git a/compiler/test/runnable/staticaa.d b/compiler/test/runnable/staticaa.d index 089144c4fb5c..6b8fb458075a 100644 --- a/compiler/test/runnable/staticaa.d +++ b/compiler/test/runnable/staticaa.d @@ -181,6 +181,32 @@ void testStaticArray() ///////////////////////////////////////////// +// https://issues.dlang.org/show_bug.cgi?id=24602 + +class Set +{ + bool[string] aa; + + this(bool[string] aa) + { + this.aa = aa; + } +} + +class Bar +{ + Set x = new Set(["a": 1, "b": 0]); +} + +void testClassLiteral() +{ + assert(new Bar().x.aa["a"] == 1); + assert(new Bar().x.aa["b"] == 0); +} + +///////////////////////////////////////////// + + void main() { testSimple(); @@ -192,4 +218,5 @@ void main() testLocalStatic(); testEnumInit(); testStaticArray(); + testClassLiteral(); } diff --git a/druntime/src/core/sys/posix/sys/statvfs.d b/druntime/src/core/sys/posix/sys/statvfs.d index eae0e5c95c6b..9405a6d5387e 100644 --- a/druntime/src/core/sys/posix/sys/statvfs.d +++ b/druntime/src/core/sys/posix/sys/statvfs.d @@ -84,7 +84,57 @@ version (CRuntime_Glibc) { int statvfs (const char * file, statvfs_t* buf); int fstatvfs (int fildes, statvfs_t *buf); } +} +else version (CRuntime_Musl) +{ + struct statvfs_t + { + c_ulong f_bsize; + c_ulong f_frsize; + fsblkcnt_t f_blocks; + fsblkcnt_t f_bfree; + fsblkcnt_t f_bavail; + fsfilcnt_t f_files; + fsfilcnt_t f_ffree; + fsfilcnt_t f_favail; + static if (true /+__BYTE_ORDER == __LITTLE_ENDIAN+/) + { + c_ulong f_fsid; + byte[2*int.sizeof-c_long.sizeof] __padding; + } + else + { + byte[2*int.sizeof-c_long.sizeof] __padding; + c_ulong f_fsid; + } + c_ulong f_flag; + c_ulong f_namemax; + uint f_type; + int[5] __reserved; + } + + enum FFlag + { + ST_RDONLY = 1, /* Mount read-only. */ + ST_NOSUID = 2, + ST_NODEV = 4, /* Disallow access to device special files. */ + ST_NOEXEC = 8, /* Disallow program execution. */ + ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ + ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ + ST_WRITE = 128, /* Write on file/directory/symlink. */ + ST_APPEND = 256, /* Append-only file. */ + ST_IMMUTABLE = 512, /* Immutable file. */ + ST_NOATIME = 1024, /* Do not update access times. */ + ST_NODIRATIME = 2048, /* Do not update directory access times. */ + ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ + + } + + int statvfs (const char * file, statvfs_t* buf); + int fstatvfs (int fildes, statvfs_t *buf); + alias statvfs statvfs64; + alias fstatvfs fstatvfs64; } else version (NetBSD) {