[Issue 14682] [REG2.037] Incorrect interpretation of ~ []
https://issues.dlang.org/show_bug.cgi?id=14682 --- Comment #12 from Kenji Hara k.hara...@gmail.com --- (In reply to Kenji Hara from comment #3) At a concatenation expression, arr ~ elem is preferred than arr ~ arr2 when elem is implicitly convertible to typeof(arr[i]). In the code, the rhs `[]` is implicitly convertible to typeof(foo) == string. Sorry I was mistaken. Normally D's array concatenation prefers two arrays concat, rather than prepending/appending one element. I noticed a comment in CatExp::semantic explains how the ambiguity should be resolved to. if (tb1next tb2next (tb1next-implicitConvTo(tb2next) = MATCHconst || tb2next-implicitConvTo(tb1next) = MATCHconst ) ) { /* Here to avoid the case of: *void*[] a = [cast(void*)1]; *void*[] b = [cast(void*)2]; *a ~ b; * becoming: *a ~ [cast(void*)b]; */ } And in CatAssignExp::semantic, array appending is already preferred than element appending. int[] a1; int[][] a2; int[][][] a3; import std.stdio; { auto x = a1 ~ []; x.writeln(); } // prints [] { auto x = a2 ~ []; x.writeln(); } // prints [] { auto x = a3 ~ []; x.writeln(); } // prints [] Therefore I can say it's just an implementation bug in dmd. --
[Issue 14681] Add a way to specify a file import's contents on the command line
https://issues.dlang.org/show_bug.cgi?id=14681 --- Comment #3 from yebblies yebbl...@gmail.com --- (In reply to Kenji Hara from comment #2) The ':' prefix allows the compiler to tell apart import paths and key/value pairs. I think it's not good. Indeed in most platform `:` cannot be in file name, but it actually depends on the external file system. Is there more better syntax for the named import string? I thought ':' would be fairly safe as linux uses it for the path separator, and windows uses it as the drive letter separator. Is there really any risk of someone wanting to allow importing files from a directory whose name starts with ':'? --
[Issue 14681] Add a way to specify a file import's contents on the command line
https://issues.dlang.org/show_bug.cgi?id=14681 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #4 from Walter Bright bugzi...@digitalmars.com --- The version feature is deliberately restrictive. Setting variables from the command line is most often a failure to design the code properly. I don't think it is a good idea. Do you have a compelling use case for it? --
[Issue 13816] [REG2.066.0] The compiler crashes with recursive tuple expansion
https://issues.dlang.org/show_bug.cgi?id=13816 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d17412ae8705034336761a10673d3f7553e69506 fix Issue 13816 - The compiler crashes with recursive tuple expansion https://github.com/D-Programming-Language/dmd/commit/d19923916de98edfd4d505ffcd3e93f88f5f5280 Merge pull request #4738 from 9rnsr/fix13816 [REG2.066.0] Issue 13816 - The compiler crashes with recursive tuple expansion --
[Issue 14691] ddox ignores methods defined in static if
https://issues.dlang.org/show_bug.cgi?id=14691 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added CC||thecybersha...@gmail.com --- Comment #1 from Vladimir Panteleev thecybersha...@gmail.com --- DDox bugs should be filed here, I think: https://github.com/rejectedsoftware/ddox/issues --
[Issue 14004] (╯▔︹▔)╯don't use this file https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js, can't access it in china
https://issues.dlang.org/show_bug.cgi?id=14004 --- Comment #5 from Riki lp...@126.com --- script type=text/javascript src=https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js;/script script type=text/javascriptwindow.jQuery || document.write('script src=js/jquery-1.7.2.min.js\x3C/script')/script connect to ajax.googleapis.com first will block long time until time out now, i add 127.0.0.1 ajax.googleapis.com to /etc/hosts but this is not friend for new users in china why not use jquery in locally host or other free cdn http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js --
[Issue 4939] Some compile-time length tests of array concats
https://issues.dlang.org/show_bug.cgi?id=4939 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4741 It will make the Program #1 case error. Program #2 and #3 case are not in range, because they needs data flow analysis. --
[Issue 14686] Postblit isn't sometimes called on concatenation
https://issues.dlang.org/show_bug.cgi?id=14686 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4741 --
[Issue 12751] Avoid heap allocations in some cases of array concatenation
https://issues.dlang.org/show_bug.cgi?id=12751 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #2 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4741 --
[Issue 14691] New: ddox ignores methods defined in static if
https://issues.dlang.org/show_bug.cgi?id=14691 Issue ID: 14691 Summary: ddox ignores methods defined in static if Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nob...@puremagic.com Reporter: dragosc...@gmail.com This describes 'clear' and 'shrinkTo' methods: http://dlang.org/phobos-prerelease/std_array.html#.Appender But this don't: http://dlang.org/library-prerelease/std/array/appender.html --
[Issue 14692] SIGSEGV during SHA.put
https://issues.dlang.org/show_bug.cgi?id=14692 Rory rjmcgu...@gmail.com changed: What|Removed |Added Keywords||wrong-code Severity|blocker |major --- Comment #1 from Rory rjmcgu...@gmail.com --- I'm guessing its wrong code if its crashing in DMD and not GDC. --
[Issue 14693] @property return type not generated in .di file
https://issues.dlang.org/show_bug.cgi?id=14693 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Blocks||14680 --
[Issue 14693] New: @property return type not generated in .di file
https://issues.dlang.org/show_bug.cgi?id=14693 Issue ID: 14693 Summary: @property return type not generated in .di file Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: and...@erdani.com Repro: struct A { @property foo() { return 42; } } This is correct code, the fact that foo is a function is inferred from the presence of @property, and the return type is deduced automatically from the body. However, if a .di file is generated it'll have this code: struct A { @property foo(); } which is incorrect D. Solution: keep the bodies of functions with automatically inferred type in the .di file. --
[Issue 14680] Investigate the use of .di files for Phobos
https://issues.dlang.org/show_bug.cgi?id=14680 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Depends on||14693 --
[Issue 14694] New: Functions nested within functions need their body in the generated .di file
https://issues.dlang.org/show_bug.cgi?id=14694 Issue ID: 14694 Summary: Functions nested within functions need their body in the generated .di file Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: and...@erdani.com Obvious in retrospect. Repro picked from std.array: inout(T)[] overlap(T)(inout(T)[] r1, inout(T)[] r2) @trusted pure nothrow { alias U = inout(T); static U* max(U* a, U* b) nothrow { return a b ? a : b; } static U* min(U* a, U* b) nothrow { return a b ? a : b; } auto b = max(r1.ptr, r2.ptr); auto e = min(r1.ptr + r1.length, r2.ptr + r2.length); return b e ? b[0 .. e - b] : null; } After .di generation: pure nothrow @trusted inout(T)[] overlap(T)(inout(T)[] r1, inout(T)[] r2) { alias U = inout(T); static nothrow U* max(U* a, U* b); static nothrow U* min(U* a, U* b); auto b = max(r1.ptr, r2.ptr); auto e = min(r1.ptr + r1.length, r2.ptr + r2.length); return b e ? b[0..e - b] : null; } Obviously that's not going to work for more than one reason :o). --
[Issue 14694] Functions nested within functions need their body in the generated .di file
https://issues.dlang.org/show_bug.cgi?id=14694 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Blocks||14680 --
[Issue 14680] Investigate the use of .di files for Phobos
https://issues.dlang.org/show_bug.cgi?id=14680 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Depends on||14694 --
[Issue 14682] [REG2.037] Incorrect interpretation of ~ []
https://issues.dlang.org/show_bug.cgi?id=14682 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, wrong-code --- Comment #13 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4742 --
[Issue 14528] [REG2.058a] can't pass protected member to template by alias
https://issues.dlang.org/show_bug.cgi?id=14528 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 14679] Parse uninstantiated generic artifacts lazily
https://issues.dlang.org/show_bug.cgi?id=14679 Bruno Medeiros bruno.do.medeiros+deeb...@gmail.com changed: What|Removed |Added CC||bruno.do.medeiros+deebugz@g ||mail.com --- Comment #4 from Bruno Medeiros bruno.do.medeiros+deeb...@gmail.com --- (In reply to Andrei Alexandrescu from comment #3) Yah, the alternate grammar needs to recognize comments, string literals, and newlines (for line counting purposes). One nice thing about not doing tokenization is a lot of memory is saved. Why does tokenization consume memory? I imagine you can just have the token point to a slice of the source? --
[Issue 14690] pragma(inline, true) functions must have their bodies emitted in the .di file
https://issues.dlang.org/show_bug.cgi?id=14690 Iain Buclaw ibuc...@gdcproject.org changed: What|Removed |Added CC||ibuc...@gdcproject.org Hardware|x86 |All OS|Mac OS X|All --- Comment #1 from Iain Buclaw ibuc...@gdcproject.org --- Setting hardware/platform to all/all, because it's not OSX-specific. ;) --
[Issue 14692] New: SIGSEGV during SHA.put
https://issues.dlang.org/show_bug.cgi?id=14692 Issue ID: 14692 Summary: SIGSEGV during SHA.put Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: blocker Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: rjmcgu...@gmail.com I get a SEGFAULT every time I try log in to my MySQL server using mysql-native and vibe.d. If I compile with GDC I do not have this problem, and I never used to have this problem with previous versions of dmd, not sure which version etc yet. Just logging this issue in the meantime so that I don't forget. Backtrace: Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) by Undefined command: by. Try help. (gdb) bt #0 0x in ?? () #1 0x00712eea in std.digest.sha.SHA!(512, 160).SHA.put(scope const(ubyte)[]...) (this=0x7fffd160, input=...) at /usr/include/dmd/phobos/std/digest/sha.d:723 #2 0x00713072 in std.digest.sha.SHA!(512, 160).SHA.finish() (this=0x7fffd160, __HID34=0x7fffd1d0) at /usr/include/dmd/phobos/std/digest/sha.d:768 #3 0x0076f54a in std.digest.digest.digest!(std.digest.sha.SHA!(512, 160).SHA, const(ubyte)[]).digest(scope const(ubyte[])) (__HID42=0x7fffd228, _param_0=...) at /usr/include/dmd/phobos/std/digest/digest.d:433 #4 0x0076f4c1 in std.digest.sha.sha1Of!(const(ubyte)[]).sha1Of(const(ubyte)[]) (__HID41=0x7fffd298, _param_0=...) at /usr/include/dmd/phobos/std/digest/sha.d:1102 #5 0x0076c13f in mysql.connection.Connection.makeToken(ubyte[]) (this=0x77ec0c00, authBuf=...) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/connection.d:2615 #6 0x0076c3c8 in mysql.connection.Connection.authenticate(ubyte[]) (this=0x77ec0c00, greeting=...) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/connection.d:2664 #7 0x0076c5f6 in mysql.connection.Connection.connect(mysql.connection.SvrCapFlags) (this=0x77ec0c00, clientCapabilities=33293) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/connection.d:2693 #8 0x0076c9ad in mysql.connection.Connection.this(mysql.connection.MySQLSocketType, std.socket.TcpSocket(immutable(char)[], ushort) function*, vibe.core.net.TCPConnection(immutable(char)[], ushort) function*, immutable(char)[], immutable(char)[], immutable(char)[], immutable(char)[], ushort, mysql.connection.SvrCapFlags) (this=0x77ec0c00, capFlags=33293, port=3306, db=..., pwd=..., user=..., host=..., openSocketVibeD=0x76bfb8 mysql.connection.Connection.defaultOpenSocketVibeD(immutable(char)[], ushort), openSocketPhobos=0x76bf40 mysql.connection.Connection.defaultOpenSocketPhobos(immutable(char)[], ushort), socketType=incomplete type) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/connection.d:2788 #9 0x0076c786 in mysql.connection.Connection.this(mysql.connection.MySQLSocketType, immutable(char)[], immutable(char)[], immutable(char)[], immutable(char)[], ushort, mysql.connection.SvrCapFlags) (this=0x77ec0c00, capFlags=33293, port=3306, db=..., pwd=..., user=..., host=..., socketType=incomplete type) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/connection.d:2741 #10 0x0076c710 in mysql.connection.Connection.this(immutable(char)[], immutable(char)[], immutable(char)[], immutable(char)[], ushort, mysql.connection.SvrCapFlags) ( this=0x77ec0c00, capFlags=33293, port=3306, db=..., pwd=..., user=..., host=...) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/connection.d:2732 #11 0x00772430 in mysql.db.MysqlDB.createConnection() (this=0x77eca100) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/db.d:48 #12 0x0072d3db in vibe.core.connectionpool.ConnectionPool!(mysql.connection.Connection).ConnectionPool.lockConnection() (this=0x77ec7ac0, __HID44=0x7fffd838) at ../../../../../../.dub/packages/vibe-d-0.7.23/source/vibe/core/connectionpool.d:54 #13 0x007723bf in mysql.db.MysqlDB.lockConnection() (this=0x77eca100, __HID149=0x7fffd8c0) at ../../../../../../.dub/packages/mysql-native-0.0.15/source/mysql/db.d:44 #14 0x007687f5 in db.mysql_test() () at source/db.d:17 #15 0x006f525e in app._sharedStaticCtor1() () at source/app.d:16 #16 0x00768799 in app.__modsharedctor() () #17 0x0090cd51 in _D2rt5minfo67__T14runModuleFuncsS442rt5minfo11ModuleGroup8runCtorsMFZ9__lambda2Z14runModuleFuncsMFAxPyS6object10ModuleInfoZv () #18 0x0090ca7d in rt.minfo.ModuleGroup.runCtors() () #19 0x008cebe9 in rt.minfo.rt_moduleCtor().__foreachbody1(ref rt.sections_elf_shared.DSO) () #20 0x008cef7e in rt.sections_elf_shared.DSO.opApply(scope int(ref rt.sections_elf_shared.DSO) delegate) () #21
[Issue 14688] dmd writes paren-less expression in generated .di, subsequently refuses it
https://issues.dlang.org/show_bug.cgi?id=14688 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Hardware|x86 |All OS|Mac OS X|All --
[Issue 14680] Investigate the use of .di files for Phobos
https://issues.dlang.org/show_bug.cgi?id=14680 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Hardware|x86 |All OS|Mac OS X|All --
[Issue 14687] dmd does not recognize package.di, only package.d
https://issues.dlang.org/show_bug.cgi?id=14687 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Hardware|x86 |All OS|Mac OS X|All --
[Issue 5770] Template constructor bypass access check
https://issues.dlang.org/show_bug.cgi?id=5770 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #7 from Kenji Hara k.hara...@gmail.com --- (In reply to Kenji Hara from comment #4) https://github.com/D-Programming-Language/dmd/pull/4558 I reverted the fix in: https://github.com/D-Programming-Language/dmd/pull/4730 --
[Issue 14672] [REG2.067.0] Internal error: e2ir.c 4620 when copying array of derived class to an array of base class
https://issues.dlang.org/show_bug.cgi?id=14672 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/306e7b146535c84c065c41f52b3674c2ee1ac832 fix Issue 14672 - Internal error: e2ir.c 4620 when copying array of derived class to an array of base class https://github.com/D-Programming-Language/dmd/commit/c30cddff4a884d9695cb90871835df4f4cd0b810 Merge pull request #4736 from 9rnsr/fix14672 [REG2.067.0] Issue 14672 - Internal error: e2ir.c 4620 when copying array of derived class to an array of base class --
[Issue 14528] [REG2.058a] can't pass protected member to template by alias
https://issues.dlang.org/show_bug.cgi?id=14528 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1a92380f5a90a24eeadaecd4a8c3704fb65f96d7 fix Issue 14528 - can't pass protected member to template by alias https://github.com/D-Programming-Language/dmd/commit/fbb6e2a64a30314e6b92ff6f960115a156f3f329 Merge pull request #4730 from 9rnsr/fix14528 [REG2.058a] Issue 14528 - can't pass protected member to template by alias --