[Issue 9300] Syntax for loop invariants
http://d.puremagic.com/issues/show_bug.cgi?id=9300 --- Comment #1 from Don clugd...@yahoo.com.au 2013-02-05 02:08:47 PST --- Loop invariants were part of the D spec, a long time ago. They were discarded as being of negligible value. Compared to an assert, plus a comment, what do they add? while (cond) { // Loop invariant assert( xxx ); ... } Definitely the concept is very useful for reasoning about code. But that doesn't mean it needs specific language syntax. For example, it's easy for a static analysis tool to recognize this as a loop invariant. And I don't think you'll find a syntax that is nicer than what I wrote above! This is a feature which was previously evaluated and rejected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9452] New: Type-safe variadic parameter of enums does not work at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=9452 Summary: Type-safe variadic parameter of enums does not work at compile time Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis jmdavisp...@gmx.com 2013-02-05 02:39:19 PST --- This code fails to compile: enum Mix { col, } string getString()(Mix[] mixArgs...) { return {}; } void main() { enum a = getString(Mix.col); } and gives this error q.d(15): Error: Array length mismatch assigning [0..0] to [0..1] q.d(15):called from here: getString((Mix[1LU] __arrayArg862 = cast(Mix)0; , __arrayArg862[0LU] = cast(Mix)0 , cast(Mix[])__arrayArg862)) but this code succeeds enum Mix { col, } string getString()(Mix[] mixArgs...) { return {}; } void main() { enum a = getString([Mix.col]); } as does this code enum Mix { col, } string getString()(int[] mixArgs...) { return {}; } void main() { enum a = getString(Mix.col); } Apparently, the compiler can't handle figuring out the length of the array if it holds enums, and its implicitly instantiated, but if it's an array of something else or it's explicitly instantiated, it's fine. I had a much larger example which compiled with 2.060 but not 2.061, so there's a regression here, but the reduced example fails to compile with both 2.060 and 2.061, and it was already a huge pain to get a reduced example at all, so I'm not going to go through the effort of figuring out how to get a reduced example that worked with 2.060 but not 2.061. And I'll just mark this as a normal bug, since the example itself isn't a regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9300] Syntax for loop invariants
http://d.puremagic.com/issues/show_bug.cgi?id=9300 --- Comment #3 from bearophile_h...@eml.cc 2013-02-05 04:24:07 PST --- (In reply to comment #2) All D books and tutorials will have a chapter about loop invariants, Well, one or few paragraphs :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6582] alias this forward reference error
http://d.puremagic.com/issues/show_bug.cgi?id=6582 Maksim Zholudev maxim...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||maxim...@gmail.com Resolution||WORKSFORME --- Comment #1 from Maksim Zholudev maxim...@gmail.com 2013-02-05 07:41:59 PST --- Doesn't happen with 2.061 or current Git head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7985] Impossible to cast interface/object reference to void* in presence of 'alias this'
http://d.puremagic.com/issues/show_bug.cgi?id=7985 Maksim Zholudev maxim...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||maxim...@gmail.com Resolution||DUPLICATE --- Comment #1 from Maksim Zholudev maxim...@gmail.com 2013-02-05 07:53:51 PST --- *** This issue has been marked as a duplicate of issue 6777 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8001] Alias this takes ownership of explicit cast
http://d.puremagic.com/issues/show_bug.cgi?id=8001 Maksim Zholudev maxim...@gmail.com changed: What|Removed |Added CC||maxim...@gmail.com --- Comment #1 from Maksim Zholudev maxim...@gmail.com 2013-02-05 07:57:31 PST --- May be connected with http://d.puremagic.com/issues/show_bug.cgi?id=6777 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9407] Typedef doesn't work with hashes
http://d.puremagic.com/issues/show_bug.cgi?id=9407 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 08:46:20 PST --- *** This issue has been marked as a duplicate of issue 8613 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8613] std.typecons.Proxy cannot work with operator 'in'
http://d.puremagic.com/issues/show_bug.cgi?id=8613 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 08:46:22 PST --- *** Issue 9407 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9418] Segmentation fault using only datetime and stdio.
http://d.puremagic.com/issues/show_bug.cgi?id=9418 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com Platform|x86 |All OS/Version|Linux |All --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 08:54:30 PST --- How strange, what is the tilde operating on in this code? For example: import std.datetime; import std.stdio; void main() { auto x1 = ~Clock; // NG auto x2 = ~Clock.currTime(); // NG auto x3 = ~Clock.currTime().toISOString(); // NG auto x4 = Clock.currTime().toISOString()[0 .. 8]; auto x5 = ~x4; // NG auto x5 = ~Clock.currTime().toISOString()[0 .. 8]; // works?! } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9050] compiler crash on return type inference
http://d.puremagic.com/issues/show_bug.cgi?id=9050 Marco Leise marco.le...@gmx.de changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #2 from Marco Leise marco.le...@gmx.de 2013-02-05 08:55:25 PST --- Ok, I don't quite remember what my thoughts were about the return type inference, but it looks valid for the compiler to reject the code. So I followed your advice and set it to resolved. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9050] failing return type inference
http://d.puremagic.com/issues/show_bug.cgi?id=9050 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED CC||timon.g...@gmx.ch Resolution|WORKSFORME | Summary|compiler crash on return|failing return type |type inference |inference --- Comment #3 from timon.g...@gmx.ch 2013-02-05 09:06:45 PST --- (In reply to comment #2) Ok, I don't quite remember what my thoughts were about the return type inference, but it looks valid for the compiler to reject the code. So I followed your advice and set it to resolved. No, that is a bug. There is no reason for the compiler to reject the code. (It even works if B is not templated.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9418] Segmentation fault using only datetime and stdio.
http://d.puremagic.com/issues/show_bug.cgi?id=9418 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #2 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-05 09:51:39 PST --- (In reply to comment #1) How strange, what is the tilde operating on in this code? For example: Indeed this is strange. import std.datetime; import std.stdio; void main() { auto x1 = ~Clock; // NG auto x2 = ~Clock.currTime(); // NG auto x3 = ~Clock.currTime().toISOString(); // NG auto x4 = Clock.currTime().toISOString()[0 .. 8]; auto x5 = ~x4; // NG auto x5 = ~Clock.currTime().toISOString()[0 .. 8]; // works?! } Actually it operates on dynamic array honestly corrupting (complementing) both length and ptr properties. import core.stdc.stdio : printf; void main() { string foo = foo; printf(.length = %d, .ptr=%p\n, foo.length, foo.ptr); foo = ~foo[] ; printf(.length = %d, .ptr=%p\n, foo.length, foo.ptr); } My guess is that slice expression escapes internal dmd checks. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9453] New: ice(symbol.c) with slice on temporary
http://d.puremagic.com/issues/show_bug.cgi?id=9453 Summary: ice(symbol.c) with slice on temporary Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: matthias.dondo...@gmx.de --- Comment #0 from matthias.dondo...@gmx.de 2013-02-05 10:06:50 PST --- import std.string; struct Foo { this(string bar) { } Foo opSlice(size_t start, size_t end) const { return Foo(); } size_t opDollar(int dim)() const if(dim == 0) { return 1; } } int main(string[] ) { auto b = Foo(bar)[0..$]; return 0; } DMD 2.061 produces Internal error: ..\ztc\symbol.c 1025 Could be related to #9209. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5065] writefln(%f of a Tuple prints a result
http://d.puremagic.com/issues/show_bug.cgi?id=5065 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8717] `private` and `protected` restrict member usage in same module
http://d.puremagic.com/issues/show_bug.cgi?id=8717 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7420] Duplicate cannot be read at compile time error messages
http://d.puremagic.com/issues/show_bug.cgi?id=7420 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9191] Unhelpful error message on failing override
http://d.puremagic.com/issues/show_bug.cgi?id=9191 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6743] ICE(mars.c) attempting to compile an exe file
http://d.puremagic.com/issues/show_bug.cgi?id=6743 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5375] Detection of cyclic module imports provides error findings on console, instead of exception msg
http://d.puremagic.com/issues/show_bug.cgi?id=5375 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9113] ICE(interpret.c): CTFE assignment to member of struct in union
http://d.puremagic.com/issues/show_bug.cgi?id=9113 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9005] std.concurrency.spawn should allow `void delegate(Args) shared` for new Tid
http://d.puremagic.com/issues/show_bug.cgi?id=9005 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 12:54:37 PST --- Fixed, however the sample needs to change: auto foo = new Foo; to: auto foo = new shared(Foo); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8847] voldemort + inout confuses is
http://d.puremagic.com/issues/show_bug.cgi?id=8847 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8574] [std.format] The flag ' ' works for floating numbers, not only for integers
http://d.puremagic.com/issues/show_bug.cgi?id=8574 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8314] randomSample primes with constant
http://d.puremagic.com/issues/show_bug.cgi?id=8314 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8302] Documentation of dirEntries in std.file is incomplete
http://d.puremagic.com/issues/show_bug.cgi?id=8302 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8132] LPTSTR always aliases to LPSTR
http://d.puremagic.com/issues/show_bug.cgi?id=8132 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8153] Warning about toHash signature is incorrect on x86_64
http://d.puremagic.com/issues/show_bug.cgi?id=8153 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7950] Type tuples are incorrectly flattened in base type list of interface
http://d.puremagic.com/issues/show_bug.cgi?id=7950 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8105] Implement in ref
http://d.puremagic.com/issues/show_bug.cgi?id=8105 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED Summary|in ref |Implement in ref -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7740] unicodeProperties cannot be read at compile time for ctRegex
http://d.puremagic.com/issues/show_bug.cgi?id=7740 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:06:23 PST --- Compilable test-case: import std.regex; void wcp_bug_no_p(string fn) { enum ctr = ctRegex!(r\p{WhiteSpace},m); } void main() { } Fixed in git-head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7585] functions in templates inferred as delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7585 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #10 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:08:39 PST --- What's the state of this? OP sample works, but in Kenji's Comment #1 sample the line which fails is: Callback cb3 = Wrap!(f3); // NG -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6963] pure/nothrow inference doesn't work for function pointers
http://d.puremagic.com/issues/show_bug.cgi?id=6963 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:12:40 PST --- Seems fixed now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED --- Comment #27 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:16:06 PST --- This is now a deprecated feature. I've closed the report, but perhaps it should stay open until the feature is completely gone? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6635] std.conv.emplace: enforcement is too weak
http://d.puremagic.com/issues/show_bug.cgi?id=6635 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6484] compose can't take multi arg functions
http://d.puremagic.com/issues/show_bug.cgi?id=6484 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:19:21 PST --- (In reply to comment #1) Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/aa40b3b47d64dbf55bd559f113148925ced61ccf Merge pull request #753 from mylodon/enh6484 fix issue 6484 Note: this pull is unrelated to this bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6436] Refcounted initialization bug
http://d.puremagic.com/issues/show_bug.cgi?id=6436 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:19:58 PST --- Thanks, fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6171] rdmd: cache dependency file to improve startup time [patch]
http://d.puremagic.com/issues/show_bug.cgi?id=6171 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||and...@erdani.com, ||andrej.mitrov...@gmail.com --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:21:53 PST --- (In reply to comment #3) Implemented an independent solution. Indeed the speed gain for cached builds is dramatic - 6x. Currently the deps file is not saved in the temp dir. Can we mark this as fixed? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7585] functions in templates inferred as delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7585 timon.g...@gmx.ch changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #11 from timon.g...@gmx.ch 2013-02-05 13:27:23 PST --- (In reply to comment #10) What's the state of this? OP sample works, but in Kenji's Comment #1 sample the line which fails is: Callback cb3 = Wrap!(f3); // NG It is to be expected that this fails. If the OP sample works, I assume this is fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5893] Allow simple aliases for operator overloading
http://d.puremagic.com/issues/show_bug.cgi?id=5893 --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:27:26 PST --- (In reply to comment #4) Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8bc59cfe8e6896435f20ce1e9bdcc226942f59a8 fix Issue 5893 - Allow simple aliases for operator overloading https://github.com/D-Programming-Language/dmd/commit/2888ec45218e2e49048e9f96be2fa0481dc00e31 Merge pull request #989 from 9rnsr/fix5893 Issue 5893 - Allow simple aliases for operator overloading The OP sample still fails. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7585] functions in templates inferred as delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7585 --- Comment #12 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:28:09 PST --- (In reply to comment #11) (In reply to comment #10) What's the state of this? OP sample works, but in Kenji's Comment #1 sample the line which fails is: Callback cb3 = Wrap!(f3); // NG It is to be expected that this fails. If the OP sample works, I assume this is fixed. I guess he also expects this to fail then: Callback cb3 = Wrap!((){});// NG but it doesn't fail. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6171] rdmd: cache dependency file to improve startup time [patch]
http://d.puremagic.com/issues/show_bug.cgi?id=6171 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #5 from Andrei Alexandrescu and...@erdani.com 2013-02-05 13:30:20 PST --- Yes, it's been fixed a while ago. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7585] functions in templates inferred as delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7585 --- Comment #13 from timon.g...@gmx.ch 2013-02-05 13:32:58 PST --- (In reply to comment #12) (In reply to comment #11) (In reply to comment #10) What's the state of this? OP sample works, but in Kenji's Comment #1 sample the line which fails is: Callback cb3 = Wrap!(f3); // NG It is to be expected that this fails. If the OP sample works, I assume this is fixed. I guess he also expects this to fail then: Callback cb3 = Wrap!((){});// NG but it doesn't fail. This should work. What he wanted to show is that (){ } currently behaves like f3, while it should behave like f1 or f2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4793] Runtime.loadLibrary cannot load dll using MBS paths.
http://d.puremagic.com/issues/show_bug.cgi?id=4793 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3952] pragma(msg,...) has bugs + alternative idea
http://d.puremagic.com/issues/show_bug.cgi?id=3952 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #10 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 13:54:53 PST --- Is this resolved now? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2452] Unimplemented method errors should show function overload
http://d.puremagic.com/issues/show_bug.cgi?id=2452 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2565] Should be able to use an inherited method as interface implementation
http://d.puremagic.com/issues/show_bug.cgi?id=2565 --- Comment #8 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-05 14:09:31 PST --- (In reply to comment #7) (In reply to comment #6) (In reply to comment #5) but the means should be explicit. This could be implementable via a mixin template, similar to how forwarding constructors were proposed in Issue9066. A general-purpose template could be written which could be used via: snip // which expands to: override int foo() { return FooImpl.foo(); } override int bar() { return FooImpl.bar(); } Why do you need a mixin to do this? ISTM you might as well just insert these directly in your code. In any case, what you're suggesting doesn't seem to me to be an explicit way of using _an_ inherited method as _an_ interface implementation. Moreover, how does it accommodate the case where FooImpl.foo is final? Ok fair enough, the mixin definitely has its share of problems. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9454] New: Struct invariant call on whole-struct assignements?
http://d.puremagic.com/issues/show_bug.cgi?id=9454 Summary: Struct invariant call on whole-struct assignements? Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-02-05 16:55:27 PST --- See the thread: http://forum.dlang.org/thread/vqoyehpcepobnzyol...@forum.dlang.org That is about the article: http://electronicdesign.com/contributing-technical-experts/contract-driven-programming-takes-specification-beyond-stone-age It contains: In Ada 2012, predicates on a type (one particular type of invariant) are checked on parameter passing and assignment. So if we have Code 4, there will be a check failure on the assignment, since the predicate is not true. No check is generated on individual field modifications, though, so Code 5 does not raise an exception. http://electronicdesign.com/site-files/electronicdesign.com/files/uploads/2013/02/0307RequiemCode4.gif http://electronicdesign.com/site-files/electronicdesign.com/files/uploads/2013/02/0307RequiemCode5.gif This D code doesn't asserts (unlike equivalent in Ada2011): struct Foo { int x = 200; invariant() { assert(x 100); } } void main() { auto f = Foo(10); } So maybe it's a good to introduce in D as in Ada a call to the invariant when the whole struct is assigned. Another case: Although the assignment to the V fields breaks the invariant [figure 5], no exception is raised on these two statements. Thankfully, as soon as a call using V as a parameter is done, a subtype check will occur and the inconsistency will be pointed out. Hopefully, this will not be too far from the introduction of the problem. Currently D doesn't call the invariant even in that second case too: struct Foo { int x = 200; invariant() { assert(x 100); } } void bar(Foo f) {} void main() { auto f = Foo(10); bar(f); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9455] New: File.isBinaryMode and more
http://d.puremagic.com/issues/show_bug.cgi?id=9455 Summary: File.isBinaryMode and more Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-02-05 17:04:53 PST --- Some functions I write take a File reference and write some binary data on it. So in their pre-condition I'd like to assert the File to be not just open, but also opened in binary mode. I think currently there is no handy way to know if a std.stdio.File is opened in binary or text mode (or in write or read mode). After a short discussion on IRC #D with jA_cOp, I think a way to implement this feature is: - Add isBinaryMode/isWriteable/isReadable properties to File, and implement them as light wrappers around platform-specific functions that get that information. - in most cases a std.stdio.File is created with a file name and a mode string, while the usage of std.stdio.File.wrapFile() is uncommon. So on systems where those platform-specific functions are not available a workaround is to keep this mode string given to the File.__ctor. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9456] decodeFront erroneously alters its input range with reference type ranges
http://d.puremagic.com/issues/show_bug.cgi?id=9456 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added Status|NEW |ASSIGNED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9456] New: decodeFront erroneously alters its input range with reference type ranges
http://d.puremagic.com/issues/show_bug.cgi?id=9456 Summary: decodeFront erroneously alters its input range with reference type ranges Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis jmdavisp...@gmx.com 2013-02-05 17:05:12 PST --- This code import std.array; import std.conv; import std.utf; class RefRange(C) { @property bool empty() { return _str.empty; } @property C front() { return _str[0]; } void popFront() { _str = _str[1 .. $]; } @property C back() { return _str[$ - 1]; } void popBack() { _str = _str[0 .. $ - 1]; } @property auto save() { return new RefRange(_str); } @property size_t length() { return _str.length; } this(inout(C)[] str) { _str = to!(C[])(str); } C[] _str; } void main() { auto asciiStr = hello world; auto asciiRange = new RefRange!char(asciiStr); //auto asii = asciiStr; size_t index = 1; assert(asciiRange.decodeFront(index) == 'h'); assert(asciiRange.length == asciiStr.length); auto uniStr = プログラミング; auto uniRange = new RefRange!char(uniStr); //auto uniRange = uniStr; index = 3; assert(uniRange.decodeFront(index) == 'プ'); assert(uniRange.length == uniStr.length); } gives this error when it runs core.exception.AssertError@q(37): Assertion failure ./q(_d_assertm+0x26) [0x42c946] ./q() [0x42ac22] ./q(_Dmain+0xfa) [0x42a3da] ./q(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x18) [0x42d0dc] ./q(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x42cc1a] ./q(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x3b) [0x42d123] ./q(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x42cc1a] ./q(_d_run_main+0x1a8) [0x42cbd4] ./q(main+0x17) [0x42ca27] /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f60c980aa15] The last assertion fails. If you swap which lines are commented out so that strings are used instead of RefRange, then the code succeeds. The problem is that decodeFront calls popFront when dealing with unicode, and it doesn't save, so depending on what's passed to it, it may or may not pop elements. It's more efficient to save internally in the cases where it needs to rather than ask the caller to do so, so the correct fix is to make it save if it's going to pop anything. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9457] New: isSorted(string) doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=9457 Summary: isSorted(string) doesn't work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-02-05 17:08:14 PST --- This used to print true-false, but in DMD 2.062alpha prints true-true on Windows: import std.stdio, std.algorithm; void main() { auto x = abcd; writeln(isSorted(x)); auto y = acbd; writeln(isSorted(y)); } Maybe this line: https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm.d#L9237 for (; !ahead.empty; ahead.popFront(), ++i) Should be: for (; !ahead.empty; ahead.popFront(), r.popFront(), ++i) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7585] functions in templates inferred as delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7585 --- Comment #14 from Kenji Hara k.hara...@gmail.com 2013-02-05 17:19:33 PST --- (In reply to comment #10) What's the state of this? OP sample works, but in Kenji's Comment #1 sample the line which fails is: Callback cb3 = Wrap!(f3); // NG The sample in comment#1 was shown old broken compiler behavior. Callback cb1 = Wrap!(f1); // OK Callback cb2 = Wrap!(f2); // OK The Wrap function inside Wrap template is declared with extern(C). So it cannot have any hidden context pointer. And, calling f1 or f2 will not need such extra pointer, then Wrap!(f1) and Wrap!(f2) will succeed to compile. Callback cb3 = Wrap!(f3); // NG f3 is a nested function. So the Wrap function should get a hidden context to main function, but it is impossible. Then the instantiation Wrap!(f3) will fail. Callback cb3 = Wrap!((){});// NG This should be compiled. The lambda function (){} has no outer context access, so it should not be treated as nested. But, it had been accidentally done. As a conclusion, current compiler works as expected. This bug is already fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5893] Allow simple aliases for operator overloading
http://d.puremagic.com/issues/show_bug.cgi?id=5893 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #6 from Kenji Hara k.hara...@gmail.com 2013-02-05 17:24:03 PST --- (In reply to comment #5) (In reply to comment #4) Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8bc59cfe8e6896435f20ce1e9bdcc226942f59a8 fix Issue 5893 - Allow simple aliases for operator overloading https://github.com/D-Programming-Language/dmd/commit/2888ec45218e2e49048e9f96be2fa0481dc00e31 Merge pull request #989 from 9rnsr/fix5893 Issue 5893 - Allow simple aliases for operator overloading The OP sample still fails. The OP sample cannot compile, because ConcatAssignExp will try to instantiate opOpAssign!(~). Correct sample code is: class C { void concatAssign(C other) { } void concatAssign(int other) { } // to demonstrate overloading template opOpAssign(string s) if (s == ~) // FIXED { alias concatAssign opOpAssign; } } void main() { auto c = new C; c.opOpAssign!~(c); // works c.opOpAssign!~(1); // works c ~= 1; // line 15 } So, this bug is already fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7128] Cartesian product of ranges
http://d.puremagic.com/issues/show_bug.cgi?id=7128 --- Comment #3 from bearophile_h...@eml.cc 2013-02-05 18:06:03 PST --- Partially implemented: http://forum.dlang.org/thread/510f29fd574fd_2193e77ae825...@sh2.rs.github.com.mail Currently three or more arguments are not accepted: import std.stdio, std.algorithm; void main() { cartesianProduct([0,1], [0,1], [0,1]).writeln(); } Another interesting feature of Python itertools.product() that's missing is the optional repeat argument: from itertools import product list(product([0,1], repeat=3)) [(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)] list(product([0,1], repeat=4)) [(0, 0, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 0, 1, 1), (0, 1, 0, 0), (0, 1, 0, 1), (0, 1, 1, 0), (0, 1, 1, 1 ), (1, 0, 0, 0), (1, 0, 0, 1), (1, 0, 1, 0), (1, 0, 1, 1), (1, 1, 0, 0), (1, 1, 0, 1), (1, 1, 1, 0), (1, 1, 1, 1)] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7128] Cartesian product of ranges
http://d.puremagic.com/issues/show_bug.cgi?id=7128 --- Comment #5 from hst...@quickfur.ath.cx 2013-02-05 18:32:23 PST --- P.S. on second thoughts, probably the second version is not implementable right now because we can't compute the type of the return value at runtime. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7128] Cartesian product of ranges
http://d.puremagic.com/issues/show_bug.cgi?id=7128 --- Comment #6 from bearophile_h...@eml.cc 2013-02-05 18:34:12 PST --- (In reply to comment #4) Thank you for your work. I use cartesian often enough in Python. but this has the disadvantage that the resulting range will have nested tuples rather than a single tuple of multiple values at the top-level. I think this solution is not good enough. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9453] ice(symbol.c) with slice on temporary
http://d.puremagic.com/issues/show_bug.cgi?id=9453 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice, pull, rejects-valid Platform|x86 |All OS/Version|Windows |All --- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-02-05 20:04:40 PST --- Indexing has same problem. struct Foo { this(string bar) {} Foo opIndex(size_t index) const { return Foo(); } size_t opDollar(int dim)() const if(dim == 0) { return 1; } } int main(string[] ) { auto b = Foo(bar)[$-1]; return 0; } Pull request: https://github.com/D-Programming-Language/dmd/pull/1627 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8602] ICE(mtype.c) string mixin + auto return type + template tuple
http://d.puremagic.com/issues/show_bug.cgi?id=8602 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #6 from Kenji Hara k.hara...@gmail.com 2013-02-05 21:05:08 PST --- (In reply to comment #5) (In reply to comment #3) Further reduced. -- template T8602(func...) if (func.length == 1) { } struct Bug8602 { auto xx() { } } T8602!(mixin(Bug8602.xx)) mm; The ICE is gone in git-head, now only gives: Error: T8602!(xx) is used as a type This is correct behavior, because T8602!(Bug8602.xx) does not make a type. Maybe this is a dup of bug 5933. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9453] ice(symbol.c) with slice on temporary
http://d.puremagic.com/issues/show_bug.cgi?id=9453 --- Comment #2 from github-bugzi...@puremagic.com 2013-02-05 21:31:36 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6e2f1ec1abfacf61f9f156ccf5b814a3f6e26591 fix Issue 9453 - ice(symbol.c) with slice on temporary https://github.com/D-Programming-Language/dmd/commit/d9b239775639c414d1ba94cacb352dc724650c3c Merge pull request #1627 from 9rnsr/fix9453 Issue 9453 - ice(symbol.c) with slice on temporary -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9458] New: ModExp generates invalid code against array operands
http://d.puremagic.com/issues/show_bug.cgi?id=9458 Summary: ModExp generates invalid code against array operands Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid, wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2013-02-05 22:48:41 PST --- In this code, line 4 is not valid array-operation. But, compiler accepts such invalid code. Note that: slice expression MUST appear in LHS operand for valid array operation. void main() { int[] a = [1, 2, 3]; a = a[] % a[]; // line 4 import std.stdio; writeln(a); // prints [] } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9418] Segmentation fault using only datetime and stdio.
http://d.puremagic.com/issues/show_bug.cgi?id=9418 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||accepts-invalid, pull, ||wrong-code Severity|normal |major --- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-02-05 23:22:36 PST --- (In reply to comment #2) My guess is that slice expression escapes internal dmd checks. That is correct. At least, glue layer should reject such incorrect codegen. https://github.com/D-Programming-Language/dmd/pull/1628 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9458] ModExp generates invalid code against array operands
http://d.puremagic.com/issues/show_bug.cgi?id=9458 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-02-05 23:22:38 PST --- https://github.com/D-Programming-Language/dmd/pull/1628 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---