[Issue 20142] Incorrect auto ref inference for manifest constant member
https://issues.dlang.org/show_bug.cgi?id=20142 Basile-z changed: What|Removed |Added CC||b2.t...@gmx.com OS|Linux |All --- Comment #3 from Basile-z --- The reduced test case is not catching the problem anymore. This one does: --- void empty(T)(auto /*const*/ ref T a) { } struct Foo { int i; } void main() { enum Foo foo = Foo(0); foo.i.empty(); } --- The regression is caused by a protection on function parameters (and on assign exp too) to prevent writing member of manifest constants that are aggregates, more specifically struct literals (`enum Foo foo` from the front-end POV is actually a struct literal). Without the protection, in the past, `i` could be modified, which made no sense and could even create crashes. See https://github.com/dlang/dmd/pull/10115, which added the protection. --
[Issue 14630] Std.algorithm splitter segfault on large file with mmfile, seems GC related.
https://issues.dlang.org/show_bug.cgi?id=14630 Boris Carvajal changed: What|Removed |Added Status|NEW |RESOLVED CC||boris...@gmail.com Resolution|--- |INVALID --- Comment #1 from Boris Carvajal --- The problem is that MmFile is a class and the construct "cast(string)mapFile[]" doesn't prevent the object from being collected. Declaring the variable with scope scope mapFile = new MmFile(map_path); or simply using it after the loop foreach(line ; splitter(cast(string)mapFile[], '\n')) { ... } mapFile.length; makes the program succeed. --
[Issue 20440] Associative arrays of BigInt does not support require or get function
https://issues.dlang.org/show_bug.cgi?id=20440 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #2 from Dlang Bot --- @GoaLitiuM created dlang/phobos pull request #7312 "Fix Issue 20440 - Associative arrays of BigInt does not support require or get function" fixing this issue: - Fix Issue 20440 - Associative arrays of BigInt does not support require or get function https://github.com/dlang/phobos/pull/7312 --
[Issue 20424] A constructor with a value argument of the same type as being constructed should be an error
https://issues.dlang.org/show_bug.cgi?id=20424 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com --- Comment #3 from Andrei Alexandrescu --- This has been discussed and settled a long time ago. --
[Issue 20424] A constructor with a value argument of the same type as being constructed should be an error
https://issues.dlang.org/show_bug.cgi?id=20424 --- Comment #4 from Andrei Alexandrescu --- This has been discussed and settled a long time ago. --
[Issue 20440] Associative arrays of BigInt does not support require or get function
https://issues.dlang.org/show_bug.cgi?id=20440 mipri changed: What|Removed |Added CC||mi...@minimaltype.com --- Comment #1 from mipri --- with v2.086.1, either of the following permits the test case to compile: in phobos/std/bigint.d, add a 'ref' to the following return type: /// Assignment from another BigInt. BigInt opAssign(T:BigInt)(T x) pure @nogc in druntime/import/object.d, change the last line of require from return found ? *p : (*p = value); to if (!found) *p = value; return *p; --
[Issue 20440] New: Associative arrays of BigInt does not support require or get function
https://issues.dlang.org/show_bug.cgi?id=20440 Issue ID: 20440 Summary: Associative arrays of BigInt does not support require or get function Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: hromin...@gmail.com import std.bigint; void main(){ BigInt[int] foo; foo.require(0, BigInt.init); } Does not compile: /usr/include/dmd/druntime/import/object.d(2600): Error: (*p).opAssign(value()) is not an lvalue and cannot be modified test.d(4): Error: template instance object.require!(int, BigInt) error instantiating --
[Issue 8224] std.typetuple: foreach loop returns always first element
https://issues.dlang.org/show_bug.cgi?id=8224 Simen Kjaeraas changed: What|Removed |Added Component|phobos |dmd --- Comment #9 from Simen Kjaeraas --- Definitely. I didn't even consider the possibility that this could have been filed as a Phobos bug when I commented. :p --
[Issue 10465] ReturnType does not store the storage class
https://issues.dlang.org/show_bug.cgi?id=10465 berni44 changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@d-ecke.de Resolution|--- |INVALID --
[Issue 6641] RefAppender!(T[]) should be OutputRange.
https://issues.dlang.org/show_bug.cgi?id=6641 berni44 changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@d-ecke.de Resolution|--- |WORKSFORME --
[Issue 8224] std.typetuple: foreach loop returns always first element
https://issues.dlang.org/show_bug.cgi?id=8224 --- Comment #8 from berni44 --- (In reply to Simen Kjaeraas from comment #7) > It seems DMD caches the template instantiation and doesn't update it for each > iteration. Hence, this is a DMD bug and not Phobos? --
[Issue 8224] std.typetuple: foreach loop returns always first element
https://issues.dlang.org/show_bug.cgi?id=8224 Simen Kjaeraas changed: What|Removed |Added CC||simen.kja...@gmail.com --- Comment #7 from Simen Kjaeraas --- The problem is reducible to this: unittest { import std.stdio, std.typetuple; const fun1 = () => 0; const fun2 = () => 1; foreach (i, f; AliasSeq!(fun1, fun2)) { alias f2 = Alias!f; assert(i == f(), "foreach alias works great"); assert(i == f2(), "template is incorrectly cached"); } } As we can see, the issue occurs when f is passed to a template. It seems DMD caches the template instantiation and doesn't update it for each iteration. --
[Issue 8947] redBlackTree() of fixed size arrays
https://issues.dlang.org/show_bug.cgi?id=8947 berni44 changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@d-ecke.de Resolution|--- |INVALID --- Comment #2 from berni44 --- t2 has elements of type int, while a is of type int[2]. You can't mix them. --
[Issue 20431] Allow a Mixin Type to resolve to an expression where it makes sense
https://issues.dlang.org/show_bug.cgi?id=20431 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #10629 "Fix issue 20431 - Allow a Mixin Type to resolve to an expression" was merged into stable: - ece7f2cd978ab5e2138f0ccdcf176aaebebde569 by Boris Carvajal: Fix issue 20431 - Allow a Mixin Type to resolve to an expression https://github.com/dlang/dmd/pull/10629 --
[Issue 20349] [REG2.087] ICE with sqrt
https://issues.dlang.org/show_bug.cgi?id=20349 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #1 from Dlang Bot --- @WalterBright created dlang/dmd pull request #10652 "fix Issue 20349 - [REG2.087] ICE with sqrt" fixing this issue: - fix Issue 20349 - [REG2.087] ICE with sqrt https://github.com/dlang/dmd/pull/10652 --
[Issue 20439] memoize fails with types that have a void opAssign
https://issues.dlang.org/show_bug.cgi?id=20439 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #1 from Dlang Bot --- @aliak00 updated dlang/phobos pull request #7311 "Fixes 20439: fix memoize return statement" fixing this issue: - Fixes issue 20439: fix memoize return statement https://github.com/dlang/phobos/pull/7311 --
[Issue 20439] New: memoize fails with types that have a void opAssign
https://issues.dlang.org/show_bug.cgi?id=20439 Issue ID: 20439 Summary: memoize fails with types that have a void opAssign Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: ali.akhtarz...@gmail.com struct S(T) { void opAssign(T)(T) {} } S!int f() { return S!int(); } void main() { alias test = memoize!f; } functional.d(1138): Error: return expression expected --