[Issue 15604] std.array.array of structs with template opAssign and default initialised "new"ed class member.
https://issues.dlang.org/show_bug.cgi?id=15604 --- Comment #1 from John Colvin--- The problem comes from a deeper issue with static initialisers with indirections, which are just a nightmare. Nonetheless, here's the fix: https://github.com/D-Programming-Language/phobos/pull/3952 --
[Issue 15608] extern(C++) mangling problem
https://issues.dlang.org/show_bug.cgi?id=15608 --- Comment #3 from Sobirari Muhomori--- Looks like 'U' is virtual, 'Q' is final, '$$CB' is const in Slice. --
[Issue 15309] [dmd-internal] ScopeExp.semantic() should set its type always
https://issues.dlang.org/show_bug.cgi?id=15309 --- Comment #6 from Martin Nowak--- Trying to fix this I arrived at the following conclusion. https://github.com/D-Programming-Language/dmd/pull/5366#issuecomment-174946328 > It's also a deeper problem, because ScopeExp can't know whether it's used in a > function call with arguments or in a typeof expression, it's not possible to > resolve the template instance only within ScopeExp. Subsequently ScopeExp > should be what it's doc comment says `Mainly just a placeholder`, and do > nothing (or better `assert(0)`) in it's semantic function. > Anything involving a ScopeExp must be handled above it (using the template > instance stored in the ScopeExp). --
[Issue 15611] DMD doesn't build with VS2015
https://issues.dlang.org/show_bug.cgi?id=15611 --- Comment #2 from Manu--- https://github.com/D-Programming-Language/dmd/pull/5367 This fixes the compile error. --
[Issue 15613] Parameter type mismatch error message are not very helpful
https://issues.dlang.org/show_bug.cgi?id=15613 Ketmar Darkchanged: What|Removed |Added CC||ket...@ketmar.no-ip.org --- Comment #1 from Ketmar Dark --- or, at least, as a (possibly) simplier solution — prettyprint both declarations on separate lines, aligning arguments (possibly ommiting argument names), so it can be easily visually compared. --
[Issue 15615] Creating a Variant with a const primitive type doesn't compile
https://issues.dlang.org/show_bug.cgi?id=15615 Alex Parrillchanged: What|Removed |Added CC||initrd...@gmail.com OS|Windows |Linux --
[Issue 15615] New: Creating a Variant with a const primitive type doesn't compile
https://issues.dlang.org/show_bug.cgi?id=15615 Issue ID: 15615 Summary: Creating a Variant with a const primitive type doesn't compile Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: initrd...@gmail.com Trying to construct a variant with a constant value type (i.e. the value is copied so the const doesn't matter) fails with a compiler error. Example: import std.variant; alias Value = Algebraic!(long, double); void main() { const long foo = 123L; long bar = foo; Value baz = Value(foo); } > rdmd ~/test.d /usr/include/dmd/phobos/std/variant.d(544): Error: static assert "Cannot store a const(long) in a VariantN!(8LU, long, double)" /home/col/test.d(9):instantiated from here: __ctor!(const(long)) Failed: ["dmd", "-v", "-o-", "/home/col/test.d", "-I/home/col"] The same issue occurs if `foo` is immutable, or a double or boolean. However, it does work with structs or slices: import std.variant; struct MyStruct { int a, b; } alias Value = Algebraic!(MyStruct, string); void main() { const MyStruct foo = MyStruct(1, 2); MyStruct bar = foo; Value baz = Value(foo); const string foo2 = "asdf"; string bar2 = foo2; Value baz2 = Value(foo2); } --
[Issue 15614] more helpful error messages when bang omiitted
https://issues.dlang.org/show_bug.cgi?id=15614 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com Component|phobos |dmd Hardware|x86_64 |All OS|Linux |All --
[Issue 15612] New: Break immutability with default initialisers
https://issues.dlang.org/show_bug.cgi?id=15612 Issue ID: 15612 Summary: Break immutability with default initialisers Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: john.loughran.col...@gmail.com void main() { immutable S s0; S s1; assert(s0.c.a == 42); s1.c.a = -42; assert(s0.c.a == 42); //FAILS! } struct S { C c = new C(42); } class C { int a; this(int a) { this.a = a; } } --
[Issue 15613] New: Parameter type mismatch error message are not very helpful
https://issues.dlang.org/show_bug.cgi?id=15613 Issue ID: 15613 Summary: Parameter type mismatch error message are not very helpful Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: alil...@gmail.com Example of such an error: source\mymodule.d(244): Error: function distance.Distance.nextBuffer (const(float)* inputLeft, const(float)* inputRight, float distanceDB, float* outL, float* outR, int frames) is not callable using argument types (const(float*), const(float*), float, float[], float[], int) One must mentally parse the entire message to find that parameter 3 and 4 should be float[] but are float*. It gets the worse the longer the function prototype is. It would be great if the compiler can do it and give the parameter index that mismatches. --
[Issue 15612] Break immutability with default initialisers
https://issues.dlang.org/show_bug.cgi?id=15612 ag0ae...@gmail.com changed: What|Removed |Added Keywords||accepts-invalid CC||ag0ae...@gmail.com --
[Issue 15579] extern(C++) interfaces/multiple-inheritance
https://issues.dlang.org/show_bug.cgi?id=15579 --- Comment #11 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/073ac6b496971015fc8cce08abea394093d75982 2nd try fix Issue 15579 - extern(C++) interfaces/multiple-inheritance https://github.com/D-Programming-Language/dmd/commit/b4ac93569071d17ea08fdce017f20c02dc6b727c Merge pull request #5364 from WalterBright/fix15579-2 2nd try fix Issue 15579 - extern(C++) interfaces/multiple-inheritance --
[Issue 15614] New: more helpful error messages when bang omiitted
https://issues.dlang.org/show_bug.cgi?id=15614 Issue ID: 15614 Summary: more helpful error messages when bang omiitted Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: lae...@laeeth.com import std.stdio; import std.string; import std.process; import std.algorithm; import std.array:array; import std.typecons:Tuple; import std.file:exists; enum whitelists=[ "/etc/mail/spamassassin/sent_whitelist.txt", "/etc/mail/spamassassin/vcard_whitelist.txt" ]; enum postgreyWhitelistPath="/etc/postfix/postgrey_whitelist_clients.local"; int main(string[] args) { bool all=false; string result; foreach(file;whitelists) { result~=(cast(string)std.file.read(file)) .splitLines .map(a=>a.extractDomain) .array .sort .uniq .filter(a=>(a.length>0)) .join("\n"); } std.file.write(postgreyWhitelistPath,result); return 0; } string extractDomain(string entry) { return entry; } simple.d(22): Error: template std.algorithm.iteration.map cannot deduce function from argument types !()(string[], void), candidates are: /usr/include/dlang/dmd/std/algorithm/iteration.d(431): std.algorithm.iteration.map(fun...) if (fun.length >= 1) Perhaps we could check if it would compile if a ! were added to the parameters and if so say "did you mean ...?" Yes, one quickly gets used to it, but it's one more needless friction for people learning the language. --
[Issue 15605] Invalid result of ptrdiff_t comparison.
https://issues.dlang.org/show_bug.cgi?id=15605 keepitsimplesir...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --
[Issue 5390] Make it possible to test whether a type is an instantiation of a particular template
https://issues.dlang.org/show_bug.cgi?id=5390 Jakob Ovrumchanged: What|Removed |Added Status|NEW |RESOLVED CC||jakobov...@gmail.com Resolution|--- |FIXED --- Comment #4 from Jakob Ovrum --- This was fixed some time ago, it now works with variadic arguments, and there's a wrapper for it in std.traits.isInstanceOf. --