[Issue 12394] Regression: std.regex unittests take agonizingly long to run - like hours on OSX
https://issues.dlang.org/show_bug.cgi?id=12394 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 12394] Regression: std.regex unittests take agonizingly long to run - like hours on OSX
https://issues.dlang.org/show_bug.cgi?id=12394 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/a6cb0315a5e0188a60796453fc2bcfdecf8a2c75 fix Issue 12394 - Regression: std.regex unittests take agonizingly long to run - like hours on OSX https://github.com/D-Programming-Language/phobos/commit/6dbc50b47bbdd04e0c574df51221890b39be9049 Merge pull request #2098 from WalterBright/fix12394 fix Issue 12394 - Regression: std.regex unittests take agonizingly long ... --
[Issue 12612] Case-sensitivity issue in Windows
https://issues.dlang.org/show_bug.cgi?id=12612 Manu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Manu --- Sorry, false alarm. My bad! --
[Issue 12612] New: Case-sensitivity issue in Windows
https://issues.dlang.org/show_bug.cgi?id=12612 Issue ID: 12612 Summary: Case-sensitivity issue in Windows Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: turkey...@gmail.com I am getting this error in Windows. Error: module fuji.c.MFFileSystem from file D:\WinDev\fuji\dist\include\d2\fuji\c\MFFilesystem.d conflicts with another module MFFileSystem from file ..\Fuji\dist\include\d2\fuji\c\MFFileSystem.d One's absolute, and the other's relative, but they both refer to the same file. However for some reason it complains that there's a conflict. I suspect perhaps the mismatching case fuji vs Fuji at the start of the path. The module hierarchy starts at 'include\d2\', so the part of the path that represents the module name (fuji.c.MFFileSystem) is case correct, but the path prior seems to have mixed up the case somehow, and maybe that's causing the conflict? --
[Issue 12394] Regression: std.regex unittests take agonizingly long to run - like hours on OSX
https://issues.dlang.org/show_bug.cgi?id=12394 --- Comment #2 from Walter Bright --- Thanks, Dmitry, it works! https://github.com/D-Programming-Language/phobos/pull/2098 --
[Issue 9596] Ambiguous match is incorrectly hidden by additional lesser match
https://issues.dlang.org/show_bug.cgi?id=9596 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 --- Comment #6 from Kenji Hara --- (In reply to Andrej Mitrovic from comment #2) > For example, in 'implicitConvTo' in the visitor functions 'result' is simply > initialized to MATCHnomatch if the dimensions of the two slices don't match. > But this isn't propagate back to the caller side. If e->implicitConvTo(t) returns MATCHnomatch, e->implicitCastTo(sc, t) should cause error which represents why e does not match to t. So, the following compiler code form would be sufficient. e = e->implicitCastTo(sc, t); or: if (e->implicitConvTo(t)) { e = e->implicitCastTo(sc, t); assert(e->op != TOKerror); // always succeeds } else { // extra handling for the unmatch, if e and t have known forms. if (...) { error("more better diagnostic for particular case"); e = new ErrorExp(); } // error report for generic case // (if e is already an ErrorExp, no redundant error generated) e = e->implicitCastTo(sc, t); } --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #5 from Kenji Hara --- https://github.com/D-Programming-Language/dmd/pull/3485 --
[Issue 12576] problem with compile time struct field
https://issues.dlang.org/show_bug.cgi?id=12576 --- Comment #2 from Ellery Newcomer --- yeah, that's what I do now, so this one is probably not the highest priority --
[Issue 12611] New: Deprecation and then error for implicit casts that lose precision in foreach index loops
https://issues.dlang.org/show_bug.cgi?id=12611 Issue ID: 12611 Summary: Deprecation and then error for implicit casts that lose precision in foreach index loops Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: bearophile_h...@eml.cc In this program the assignment to x1 is accepted, but the assignments to x2 and x3 are refused: // Program #1. void main() { int[200] data1; ubyte x1 = data1.length; int[300] data2; ubyte x2 = data2.length; auto data3 = new int[300]; ubyte x3 = data3.length; } It gives (dmd 2.066alpha): test.d(5,16): Error: cannot implicitly convert expression (300u) of type uint to ubyte test.d(7,16): Error: cannot implicitly convert expression (data3.length) of type uint to ubyte Likewise the x2 case, this code is refused statically: // Program #2. void main() { int[300] data; foreach (ubyte i, x; data) {} // Error } test.d(3,5): Error: index type 'ubyte' cannot cover index range 0..300 But this code compiles and runs (and it seems to go in infinite loop): // Program #3. void main() { auto data1 = new int[300]; foreach (ubyte i, x; data1) {} int[300] data2; foreach (ubyte i, x; data2[]) {} } I think accepting silently the ubyte <- size_t assignment is bad and it goes against the behavour we expect from D as shown in the x2 and x3 cases. So I suggest to: 1) Give a warning in situations like program #3. (If you want you can also insert a run-time assert in non-release mode, that gards against the infinite loop with a clean run time error message. Perhaps Steven Schveighoffer has suggested something like this). 2) Turn the warning into a deprecation (and keep the run-time test, if already implemented). 3) Turn the deprecation into an error. If you want you can skip the first step, and introduce a deprecation already. See also Issue 9570 --
[Issue 12609] Useless variable assignment in std.regex
https://issues.dlang.org/show_bug.cgi?id=12609 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/phobos/pull/ ||2097 Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --
[Issue 12609] Useless variable assignment in std.regex
https://issues.dlang.org/show_bug.cgi?id=12609 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic --- This used to be: - static if(direction == OneShot.Fwd) startPc = startPc; else startPc = cast(uint)re.ir.length-IRL!(IR.LookbehindEnd); - And changed to the current code in commit d9eaf22. My guess is Dmitry probably used some Vim/regex(heh)-style search&replace, and the dead assignment was left in place. --
[Issue 12608] Dead assignment in UUIDParsingException
https://issues.dlang.org/show_bug.cgi?id=12608 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/phobos/pull/ ||2096 CC||andrej.mitrov...@gmail.com Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --
[Issue 12610] New: std.algorithm.reduce (with seed) and array-wise operation produces incorrect result
https://issues.dlang.org/show_bug.cgi?id=12610 Issue ID: 12610 Summary: std.algorithm.reduce (with seed) and array-wise operation produces incorrect result Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: acehr...@yahoo.com The following program produces incorrect and random results like [373728176], [-2022052576], etc. (Build *without* -inline.) import std.stdio; import std.algorithm; void main() { int[] arr = [ 0 ]; int[1] seed; int[] result = reduce!((sum, _) => sum[])(seed, arr); writefln("%s", result); } Any of the following is sufficient to cover up the issue: * Building with -inline * Not slicing sum inside the lambda but returning it directly (i.e. => sum) * Inserting a writefln expression inside the lambda Ali --
[Issue 12609] New: Useless variable assignment in std.regex
https://issues.dlang.org/show_bug.cgi?id=12609 Issue ID: 12609 Summary: Useless variable assignment in std.regex Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: trivial Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: brian-sch...@cox.net https://github.com/D-Programming-Language/phobos/blob/master/std/regex.d#L5366 The line: startPc = startPc; does nothing and should probably be removed. --
[Issue 12607] Document that IUnknown classes must mark toString with extern(D) when overriding it
https://issues.dlang.org/show_bug.cgi?id=12607 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/1bf4ff048ac36104a713f3b467cf6f5426f3a4c9 Fix Issue 12607 - Document that IUnknown classes must mark toString with extern(D) when overriding it. https://github.com/D-Programming-Language/dlang.org/commit/652b96b865f5378c166b553b45ac6786d3e3c37e Merge pull request #543 from AndrejMitrovic/Fix12607 Issue 12607 - Document that IUnknown classes must mark toString with extern(D) when overriding it --
[Issue 12385] Enum member should not be modifiable when the member is immutable
https://issues.dlang.org/show_bug.cgi?id=12385 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/dmd/pull/348 ||4 CC||andrej.mitrov...@gmail.com Hardware|x86_64 |All Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com Summary|You can modify some |Enum member should not be |immutable values in enums. |modifiable when the member ||is immutable OS|Linux |All --
[Issue 12608] New: Dead assignment in UUIDParsingException
https://issues.dlang.org/show_bug.cgi?id=12608 Issue ID: 12608 Summary: Dead assignment in UUIDParsingException Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: brian-sch...@cox.net https://github.com/D-Programming-Language/phobos/blob/master/std/uuid.d#L1541 I believe this line should be this.input = input; --
[Issue 12464] DMD/Phobos cannot auto-implement D variadic methods
https://issues.dlang.org/show_bug.cgi?id=12464 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/phobos/pull/ ||2094 CC||andrej.mitrov...@gmail.com Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic --- Works in git-head. Maybe fixed by a pull for another issue? --
[Issue 12450] Deprecated code in std.stdio.readf
https://issues.dlang.org/show_bug.cgi?id=12450 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic --- Even if worked around the code doesn't seem to work at runtime: object.Exception@C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(4069): Wrong unformat specifier '%(' for int Do you know if 'stdin.readf("%(%d %)", array);' has ever been supported? --
[Issue 12151] Diagnostic for .dup/.idup should emit code before the internal rewrite
https://issues.dlang.org/show_bug.cgi?id=12151 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #2 from Andrej Mitrovic --- Seems to have been fixed in git-head. --
[Issue 12441] DDoc should ignore interleaved non-doc comments
https://issues.dlang.org/show_bug.cgi?id=12441 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Andrej Mitrovic --- I still can't recreate this. I'll have to close as worksforme until there's a proper test-case. Please do file one if you find it, thanks. --
[Issue 12332] std.json API broken without notice
https://issues.dlang.org/show_bug.cgi?id=12332 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution|--- |FIXED --- Comment #4 from Andrej Mitrovic --- Marking as fixed, unless there's more to fix here? --
[Issue 12558] try/catch allows implicit catching of Throwables without specifying any Exception type
https://issues.dlang.org/show_bug.cgi?id=12558 --- Comment #6 from Andrej Mitrovic --- (In reply to monarchdodra from comment #5) > Besides, how hard is it to just write: "catch(Throwbale)" The general rule is: When there's a way to abuse the system, it /will/ be abused. The only reason why I found out about this feature is because it's used in the dub project. I was surprised it even compiled, and doubly-surprised that it's actually catching Throwables. --
[Issue 12462] std.bitmanip.BitArray should use new-style operator overloads
https://issues.dlang.org/show_bug.cgi?id=12462 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/phobos/pull/ ||2093 Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --
[Issue 12558] try/catch allows implicit catching of Throwables without specifying any Exception type
https://issues.dlang.org/show_bug.cgi?id=12558 monarchdo...@gmail.com changed: What|Removed |Added CC||monarchdo...@gmail.com --- Comment #5 from monarchdo...@gmail.com --- "catch" should only be catching exceptions, for the same reason that "nothrow" only makes promises about exceptions. Errors (or more generally Throwables) are NOT the standard, and should always be dealt with explicitly. Besides, how hard is it to just write: "catch(Throwbale)" --
[Issue 12488] foreach() should accept (and ignore) 'auto' in ForeachType
https://issues.dlang.org/show_bug.cgi?id=12488 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #2 from Andrej Mitrovic --- I don't think this makes any sense. If we were forced to either write auto or ref, then yeah this would actually save us from some bugs, e.g. iterating over a struct array by value (a very common bug IMHO): - struct S { int x; } void main() { S[] arr; arr.length = 2; foreach (s; arr) s.x = 10; // fails assert(arr == [S(10), S(10)]); } - In this case if we were force to use 'auto' or 'ref' then this bug would be easier to catch. But adding support for 'auto' without requiring a change will do us no good. People will start questioning "why is there an auto if it doesn't do anything", and it's always a bad idea to have two syntaxes that do the exact same thing. It will only cause confusion. --
[Issue 7066] You can redefine .init and .stringof without error
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #3 from Andrej Mitrovic --- *** Issue 8817 has been marked as a duplicate of this issue. *** --
[Issue 8817] Symbols named init should be illegal
https://issues.dlang.org/show_bug.cgi?id=8817 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution|--- |DUPLICATE --- Comment #3 from Andrej Mitrovic --- *** This issue has been marked as a duplicate of issue 7066 *** --
[Issue 12233] Attempting to use TypeInfo.init results in a compiler error due to lack of 'this'.
https://issues.dlang.org/show_bug.cgi?id=12233 Andrej Mitrovic changed: What|Removed |Added Depends on||7066 See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=7066 --
[Issue 7066] You can redefine .init and .stringof without error
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic changed: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=12233 Blocks||12233 --
[Issue 12545] An object with .init breaks std.range.ElementType
https://issues.dlang.org/show_bug.cgi?id=12545 Andrej Mitrovic changed: What|Removed |Added Depends on||7066 --
[Issue 7066] You can redefine .init and .stringof without error
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com Blocks||12545 --
[Issue 7066] You can redefine .init and .stringof without error
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic changed: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=12545 --
[Issue 12545] An object with .init breaks std.range.ElementType
https://issues.dlang.org/show_bug.cgi?id=12545 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=7066 --
[Issue 12558] try/catch allows implicit catching of Throwables without specifying any Exception type
https://issues.dlang.org/show_bug.cgi?id=12558 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/dmd/pull/348 ||2 Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --
[Issue 12558] try/catch allows implicit catching of Throwables without specifying any Exception type
https://issues.dlang.org/show_bug.cgi?id=12558 Vladimir Panteleev changed: What|Removed |Added CC||thecybersha...@gmail.com --
[Issue 12575] extern(C) mangling ignored inside mixin template
https://issues.dlang.org/show_bug.cgi?id=12575 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic --- Technically they are part of a "namespace", since you can disambiguate them: - mixin template T1() { extern(C) void fizzle() { } } mixin template T2() { extern(C) void fizzle() { } } mixin T1!() t1; mixin T2!() t2; void main() { t1.fizzle(); t2.fizzle(); } - So I guess that's why they're mangled. As a workaround you can use this: - mixin template T() { // or just pragma(mangle, "fizzle"), but this will at least error if // you change the function name pragma(mangle, __traits(identifier, fizzle)) extern(C) void fizzle(); } mixin T!(); void main() { fizzle(); } - --
[Issue 12100] __GENTYPE to generate ever different types
https://issues.dlang.org/show_bug.cgi?id=12100 --- Comment #2 from Andrej Mitrovic --- (In reply to Andrej Mitrovic from comment #1) > How about __uniqueID, which would create a unique string ID? I'd imagine > this would be more useful since it's more generic, and you could easily > create a wrapper for it via: > > - > template GENTYPE() > { > mixin("struct %1$s { }; alias GENTYPE = %1$s".format(__uniqueID)); > } > - Also __uniqueID would be useful for generating parameter names, and pretty much anywhere where you're using string mixins and need to use some unique names. --
[Issue 12100] __GENTYPE to generate ever different types
https://issues.dlang.org/show_bug.cgi?id=12100 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic --- How about __uniqueID, which would create a unique string ID? I'd imagine this would be more useful since it's more generic, and you could easily create a wrapper for it via: - template GENTYPE() { mixin("struct %1$s { }; alias GENTYPE = %1$s".format(__uniqueID)); } - --
[Issue 12181] std.conv.to should support static array manifest constants
https://issues.dlang.org/show_bug.cgi?id=12181 Andrej Mitrovic changed: What|Removed |Added Summary|to!string fails on static |std.conv.to should support |array manifests |static array manifest ||constants --
[Issue 12181] to!string fails on static array manifests
https://issues.dlang.org/show_bug.cgi?id=12181 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/phobos/pull/ ||2091 Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --
[Issue 12181] to!string fails on static array manifests
https://issues.dlang.org/show_bug.cgi?id=12181 Andrej Mitrovic changed: What|Removed |Added Summary|to!string fails on arrays |to!string fails on static |of floats |array manifests --- Comment #3 from Andrej Mitrovic --- This is an issue with the 'to' template which takes a 'ref', and you can't pass manifest constants by reference. I'll try and use 'auto ref'. --
[Issue 12536] Improve the documentation about preprocessing the files has "Ddoc" file header
https://issues.dlang.org/show_bug.cgi?id=12536 j...@red.email.ne.jp changed: What|Removed |Added Severity|normal |minor --- Comment #3 from j...@red.email.ne.jp --- (In reply to Andrej Mitrovic from comment #2) > Can we close this issue then? I'm not sure what is being asked for here. No. I suggest the Introduction page made activated(see Issue 12535) and the above description moved into there. At first, I'll make a pull for #12535. --
[Issue 12536] Improve the documentation about preprocessing the files has "Ddoc" file header
https://issues.dlang.org/show_bug.cgi?id=12536 --- Comment #2 from Andrej Mitrovic --- (In reply to jiki from comment #1) > Sorry, I should have mentioned that the above _is_ descrived in the document > page about DDOC(see the URL of this issue), nearly at the bottom of the page. > > I am afraid that we could scarsly remind it even if it matters. Can we close this issue then? I'm not sure what is being asked for here. --
[Issue 12593] [REG2.065] AA cannot have struct as key
https://issues.dlang.org/show_bug.cgi?id=12593 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 12593] [REG2.065] AA cannot have struct as key
https://issues.dlang.org/show_bug.cgi?id=12593 --- Comment #4 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/85700f9e05a229f2f810f4a5a662d0b6aaed4d5e fix Issue 12593 - AA cannot have struct as key https://github.com/D-Programming-Language/dmd/commit/4cd94f6104e3690add8fa786d4c386eae3c77184 Merge pull request #3476 from 9rnsr/fix12593 [REG2.065] Issue 12593 - AA cannot have struct as key --
[Issue 12607] Document that IUnknown classes must mark toString with extern(D) when overriding it
https://issues.dlang.org/show_bug.cgi?id=12607 --- Comment #5 from Andrej Mitrovic --- (In reply to Steven Schveighoffer from comment #4) > Once you go into IUnknown land, there's no coming back out (bwahahaha!) And somewhat ironically the spec defines IUnknown as using the extern(System) calling convention, rather than saying it's extern(Windows), as if non-Windows systems will ever support COM. --
[Issue 12607] Document that IUnknown classes must mark toString with extern(D) when overriding it
https://issues.dlang.org/show_bug.cgi?id=12607 Andrej Mitrovic changed: What|Removed |Added URL||https://github.com/D-Progra ||mming-Language/dlang.org/pu ||ll/543 Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --
[Issue 12607] Document that IUnknown classes must mark toString with extern(D) when overriding it
https://issues.dlang.org/show_bug.cgi?id=12607 --- Comment #4 from Steven Schveighoffer --- (In reply to Andrej Mitrovic from comment #3) > The only problem is, how do you call toString via an IUnknown interface? You can't. Because the layout of IUnknown interfaces MUST follow COM, the RTTI link to D's typeinfo system is missing. Remember that a proper D interface has a mechanism of defining how to find the object start (and therefore the vtable). An IUnknown interface does not have that. Note that an IUnknown object may not even be a D object! Once you go into IUnknown land, there's no coming back out (bwahahaha!) --
[Issue 12607] Document that IUnknown classes must mark toString with extern(D) when overriding it
https://issues.dlang.org/show_bug.cgi?id=12607 --- Comment #3 from Andrej Mitrovic --- The only problem is, how do you call toString via an IUnknown interface? I need it to implement better support for formatting COM objects, see Issue 11175. IUnknown doesn't declare toString, but if you cast an IUnknown interface to object you get back null. --
[Issue 12607] Document that IUnknown classes must mark toString with extern(D) when overriding it
https://issues.dlang.org/show_bug.cgi?id=12607 Andrej Mitrovic changed: What|Removed |Added Component|DMD |websites Summary|IUnknown classes cannot |Document that IUnknown |define or override a|classes must mark toString |toString method |with extern(D) when ||overriding it --
[Issue 12607] IUnknown classes cannot define or override a toString method
https://issues.dlang.org/show_bug.cgi?id=12607 --- Comment #2 from Andrej Mitrovic --- (In reply to Steven Schveighoffer from comment #1) > I JUST was playing around with this. > > I think an IUnknown class is implicitly extern(Windows) for all the methods. Ah, thanks. I kept seeing people use "extern(Windows):" in their COM classes and thought that was strange. I'll update this so it becomes a documentation issue. --
[Issue 12607] IUnknown classes cannot define or override a toString method
https://issues.dlang.org/show_bug.cgi?id=12607 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #1 from Steven Schveighoffer --- I JUST was playing around with this. I think an IUnknown class is implicitly extern(Windows) for all the methods. You have to explicitly mark toString as extern(D). --
[Issue 11175] Format should support IUnknown classes
https://issues.dlang.org/show_bug.cgi?id=11175 Andrej Mitrovic changed: What|Removed |Added Keywords||pull URL||https://github.com/D-Progra ||mming-Language/phobos/pull/ ||2090 Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com Summary|format prints null for all |Format should support |objects inheriting IUnknown |IUnknown classes --
[Issue 12593] [REG2.065] AA cannot have struct as key
https://issues.dlang.org/show_bug.cgi?id=12593 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --
[Issue 12607] IUnknown classes cannot define or override a toString method
https://issues.dlang.org/show_bug.cgi?id=12607 Andrej Mitrovic changed: What|Removed |Added OS|All |Windows --
[Issue 12607] New: IUnknown classes cannot define or override a toString method
https://issues.dlang.org/show_bug.cgi?id=12607 Issue ID: 12607 Summary: IUnknown classes cannot define or override a toString method Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: andrej.mitrov...@gmail.com Test 1: - import core.sys.windows.windows; import std.c.windows.com; class C : IUnknown { string toString() { return "E"; } extern(Windows) HRESULT QueryInterface(const(IID)*, void**) { return typeof(return).init; } extern(Windows) uint AddRef() { return 0; } extern(Windows) uint Release() { return 0; } } void main() { } - $ dmd test.d > Deprecation: class test.C use of object.Object.toString() hidden by C is > deprecated. Use 'alias Object.toString toString;' to introduce base class > overload set. Test 2: - import core.sys.windows.windows; import std.c.windows.com; class C : IUnknown { override string toString() { return "E"; } extern(Windows) HRESULT QueryInterface(const(IID)*, void**) { return typeof(return).init; } extern(Windows) uint AddRef() { return 0; } extern(Windows) uint Release() { return 0; } } void main() { } - $ dmd test.d > Error: function test.C.toString does not override any function, did you mean > to override 'object.Object.toString'? --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 --- Comment #4 from Andrej Mitrovic --- (In reply to Andrej Mitrovic from comment #2) > So the idea is the routine initializes a pointer *A function pointer (well, a delegate in this case) --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 --- Comment #3 from Andrej Mitrovic --- (In reply to Andrej Mitrovic from comment #2) > But this isn't propagate back to the caller side. propagated* --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 Andrej Mitrovic changed: What|Removed |Added CC||k.hara...@gmail.com --- Comment #2 from Andrej Mitrovic --- Kenji: The way I see it, we need some way of returning back information on why some implicit conversion didn't work. For example, in 'implicitConvTo' in the visitor functions 'result' is simply initialized to MATCHnomatch if the dimensions of the two slices don't match. But this isn't propagate back to the caller side. We could vastly improve diagnostics for type mismatches, length mismatches, template instance failures, if we had a way of return back information. I think one way we could do it is to turn the MATCH enum into a struct, which internally holds more state. For example: struct MATCH { /// equivalent to what MATCH was before: MATCHnomatch, MATCHconvert... MATCHLevel level; /// call this to emit informative diagnostic const char*(*error_fp)(); } In internal matching routines the code could do (sorry this is a bit mixed-C/D code syntax): - if (e->elements->dim != tsa->dim->toInteger()) { result = MATCH(MATCHnomatch, { return format("Array length mismatch: %s %s", e->elements->dim, tsa->dim->toInteger()); } } - So the idea is the routine initializes a pointer, and then the call site can decide whether to call it to extract a diagnostic, or whether to ignore it. For example the 'resolveFuncCall' function typically walks through several template instances before it decides on emitting diagnostics, so having a lazy way of extracting a diagnostic is cruical. On the call site (e.g. 'resolveFuncCall') the code could look like: - if (matchresult.level == MATCHnomatch) { error("Failed to match: %s", matchresult.error_fp()); } - What do you think about this design? I'm not sure whether we can create delegates in C++ like we can in D though, I'm not too familiar with what's supported there. --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 Andrej Mitrovic changed: What|Removed |Added Assignee|andrej.mitrov...@gmail.com |nob...@puremagic.com --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 Andrej Mitrovic changed: What|Removed |Added Assignee|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic --- Simplified test-case: - uint[2] arr1 = [1, 2, 3][0 .. 2]; uint[2] arr2 = [1, 2, 3][0 .. 3]; void main() { } - --
[Issue 12602] [CTFE] Changes to an array slice wrapped in a struct do not propogate to the original
https://issues.dlang.org/show_bug.cgi?id=12602 --- Comment #2 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/a2f919ee8b421ec26905690875894f2702fb0acb fix Issue 12602 - [CTFE] Changes to an array slice wrapped in a struct do not propogate to the original https://github.com/D-Programming-Language/dmd/commit/d54b1c779165eefb51b9d05e2ffe357a9f3c6afa Merge pull request #3478 from 9rnsr/fix12602 Issue 12602 - [CTFE] Changes to an array slice wrapped in a struct do not propogate to the original --
[Issue 11535] CTFE ICE on reassigning a static array initialized with block assignment
https://issues.dlang.org/show_bug.cgi?id=11535 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 11535] CTFE ICE on reassigning a static array initialized with block assignment
https://issues.dlang.org/show_bug.cgi?id=11535 --- Comment #4 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/64c27cbdefcf63442dc75b5ffab0227475d60b43 fix Issue 11535 - CTFE ICE on reassigning a static array initialized with block assignment https://github.com/D-Programming-Language/dmd/commit/0a95cd474fe1d17ee88aa47552094bd8535fbd9e Merge pull request #3479 from 9rnsr/fix11535 Issue 11535 - CTFE ICE on reassigning a static array initialized with block assignment --
[Issue 12383] dlang.org operator overloading text with DDoc macro.
https://issues.dlang.org/show_bug.cgi?id=12383 alix.pex...@gmail.com changed: What|Removed |Added CC||alix.pex...@gmail.com --- Comment #1 from alix.pex...@gmail.com --- This occurs every time that the METACODE macro appears directly inside quotes, therefore it might actually be considered a bug in DDoc (I don't see anything in the documentation for macros that says macros are treated differently when they appear in quotes). Perhaps in cases like this the macro should be placed inside another macro that add the quotes, so "($METACODE op)" becomes ($q (($METACODE op)) where q = $0 --
[Issue 12588] Segfault on X86_64 assigning std.complex to array
https://issues.dlang.org/show_bug.cgi?id=12588 Kevin L changed: What|Removed |Added CC||kevin.lamo...@gmail.com --
[Issue 12110] [CTFE] Error: CTFE internal error: Dotvar assignment
https://issues.dlang.org/show_bug.cgi?id=12110 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 12110] [CTFE] Error: CTFE internal error: Dotvar assignment
https://issues.dlang.org/show_bug.cgi?id=12110 --- Comment #2 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/44475476772b656e2b2dee5d0f1dcf38eaa056ec fix Issue 12110 - [CTFE] Error: CTFE internal error: Dotvar assignment https://github.com/D-Programming-Language/dmd/commit/107999e3de38bc0588ebc28c9c590abd328a7b09 Merge pull request #3480 from 9rnsr/fix12110 Issue 12110 - [CTFE] Error: CTFE internal error: Dotvar assignment --
[Issue 12606] Mismatch of known array length during dynamic => static array assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 Andrej Mitrovic changed: What|Removed |Added Summary|Mismatch of array length|Mismatch of known array |during assignment should|length during dynamic => |emit better diagnostics |static array assignment ||should emit better ||diagnostics --
[Issue 12606] New: Mismatch of array length during assignment should emit better diagnostics
https://issues.dlang.org/show_bug.cgi?id=12606 Issue ID: 12606 Summary: Mismatch of array length during assignment should emit better diagnostics Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: diagnostic Severity: enhancement Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: andrej.mitrov...@gmail.com - import std.range; // ok uint[256] arr1 = iota(0, 512).array[0 .. 256]; // diagnostic mentions int[] => uint[256], but no mention of length (128 != 256) uint[256] arr2 = iota(0, 512).array[0 .. 128]; void main() { } - The first one is a relatively recent feature, where a slice can be converted to a static array if the length is known. The length is also known for the second declaration, but it's not being taken into account by the diagnostic: Diagnostic: test.d(6): Error: cannot implicitly convert expression ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]) of type int[] to uint[256] Since the compiler knows the length of the slice it should mention the mismatch of slice lengths when attempting to convert a dynamic array to a static array. --
[Issue 10413] .init incorrectly accepts any expression
https://issues.dlang.org/show_bug.cgi?id=10413 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #4 from Andrej Mitrovic --- According to Walter it's ok if a UDT defines its own .init, which would make value.init valid: https://issues.dlang.org/show_bug.cgi?id=7066 I don't agree with him though, especially since the whole argument against allowing user-defined default ctors is the compile-time known .init property. --
[Issue 12604] No "mismatched array lengths" error with narrowing conversions
https://issues.dlang.org/show_bug.cgi?id=12604 --- Comment #2 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/a833827fe1391a8a70fed84b6607e21c26c41da0 fix Issue 12604 - No "mismatched array lengths" error with narrowing conversions https://github.com/D-Programming-Language/dmd/commit/fbad0edc32b1fc1ff411dc0aaa83d796d13ff858 Merge pull request #3475 from 9rnsr/fix12604 Issue 12604 - No "mismatched array lengths" error with narrowing conversions --
[Issue 12480] static assert should print out the string representation of a value it can interpret
https://issues.dlang.org/show_bug.cgi?id=12480 --- Comment #5 from Andrej Mitrovic --- (In reply to Per Nordlöw from comment #4) > I've been wanting to have a similar dynamic behaviour Ah you mean runtime. There is some related work on improving assert itself, although it doesn't go as far as you've talked about. See https://github.com/D-Programming-Language/dmd/pull/1426 --
[Issue 12480] static assert should print out the string representation of a value it can interpret
https://issues.dlang.org/show_bug.cgi?id=12480 --- Comment #4 from Per Nordlöw --- Elaboration from my previous post: I'v been wanting to have a similar dynamic behaviour for assert(EXPR) where EXPR is of the form x OP y where OP typically is a logical comparison operator ==, !=, <, >, <=, >=. For example if assert(x == y) fails it should in some useful way explain to the user why it failed. For small structures (for example builtin scalar types) it could just print them. For larger structures/ranges it would be more useful to print the first (index, value) of x and y where the assertion failed. This should probably apply recursively, for example Exception: assert(x == y) failed for i:th element of j:th element of ... x being X and ... of y being Y For large structures this may result in a significant increase in code generation (and compilation time) for all the to!string instantiations the needs to be made. Maybe a compiler flag is motivated in this case. --
[Issue 12110] [CTFE] Error: CTFE internal error: Dotvar assignment
https://issues.dlang.org/show_bug.cgi?id=12110 Kenji Hara changed: What|Removed |Added Keywords||pull, rejects-valid --- Comment #1 from Kenji Hara --- https://github.com/D-Programming-Language/dmd/pull/3480 --
[Issue 12480] static assert should print out the string representation of a value it can interpret
https://issues.dlang.org/show_bug.cgi?id=12480 --- Comment #3 from Andrej Mitrovic --- (In reply to Per Nordlöw from comment #2) > Is there pending work on a dynamic variant for this? Can you elaborate? --
[Issue 7887] [CTFE] can't assign to returned reference
https://issues.dlang.org/show_bug.cgi?id=7887 --- Comment #3 from Kenji Hara --- *** Issue 9375 has been marked as a duplicate of this issue. *** --
[Issue 9375] wrong code when assigning to ref in CTFE
https://issues.dlang.org/show_bug.cgi?id=9375 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Kenji Hara --- Fixed in git-head, because issue 7887 is properly fixed. *** This issue has been marked as a duplicate of issue 7887 *** --
[Issue 12480] static assert should print out the string representation of a value it can interpret
https://issues.dlang.org/show_bug.cgi?id=12480 Per Nordlöw changed: What|Removed |Added CC||per.nord...@gmail.com --- Comment #2 from Per Nordlöw --- Is there pending work on a dynamic variant for this? --
[Issue 11535] CTFE ICE on reassigning a static array initialized with block assignment
https://issues.dlang.org/show_bug.cgi?id=11535 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #3 from Kenji Hara --- Reduced test case: struct Hash11535 { ubyte[6] _buffer; void put(scope const(ubyte)[] data...) { uint i = 0, index = 0; auto inputLen = data.length; (&_buffer[index])[0 .. inputLen-i] = (&data[i])[0 .. inputLen-i]; } } auto md5_digest11535(T...)(scope const T data) { Hash11535 hash; hash.put(cast(const(ubyte[]))data[0]); return hash._buffer; } static assert(md5_digest11535(`TEST`) == [84, 69, 83, 84, 0, 0]); Compiler fix: https://github.com/D-Programming-Language/dmd/pull/3479 Note that the OP code would not work because std.digest.md does not support CTFE. --