[Issue 9393] New: Partial template specialization and template lambda does not work
http://d.puremagic.com/issues/show_bug.cgi?id=9393 Summary: Partial template specialization and template lambda does not work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2013-01-25 00:02:19 PST --- This code should work. template ifThrown1(E) { void ifThrown1(T)(scope T delegate(E) errHandler) {} } void ifThrown2(E, T)(scope T delegate(E) errHandler) {} void main() { ifThrown1!Exception(e = 10); ifThrown2!Exception(e = 10); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9385] [Regression 2.057] null literal should be implicitly convertible to bool
http://d.puremagic.com/issues/show_bug.cgi?id=9385 --- Comment #2 from github-bugzi...@puremagic.com 2013-01-25 00:07:56 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/849b6df852843975c2f8238deab6aeea729f9914 fix Issue 9385 - [Regression 2.057] null literal should be implicitly convertible to bool https://github.com/D-Programming-Language/dmd/commit/f1738a00e9ecb09cbfeff8d07971a5485866e6f9 Merge pull request #1545 from 9rnsr/fix9385 Issue 9385 - [Regression 2.057] null literal should be implicitly convertible to bool -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9393] Partial template specialization and template lambda does not work
http://d.puremagic.com/issues/show_bug.cgi?id=9393 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-01-25 00:12:16 PST --- https://github.com/D-Programming-Language/dmd/pull/1550 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2013-01-25 00:30:21 PST --- I can't reproduce this with the latest dmd. I'll upload a new beta tomorrow you can try. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9392] Misleading text about required OS version
http://d.puremagic.com/issues/show_bug.cgi?id=9392 Jacob Carlborg d...@me.com changed: What|Removed |Added CC||d...@me.com --- Comment #1 from Jacob Carlborg d...@me.com 2013-01-25 01:08:12 PST --- https://github.com/D-Programming-Language/installer/pull/13 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #4 from Stephan stephan.schiff...@mac.com 2013-01-25 05:01:07 PST --- (In reply to comment #3) I can't reproduce this with the latest dmd. I'll upload a new beta tomorrow you can try. What actually seems to be corrupted are the precompiled executables on the zip-file on the web. We checked this for the osx and the linux version. Both of these precompiled versions produce this bug. When we compile dmd from source, even for version 2.061 from the web, this bug does not occur. Stephan -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #5 from Stephan stephan.schiff...@mac.com 2013-01-25 06:53:50 PST --- (In reply to comment #3) I can't reproduce this with the latest dmd. I'll upload a new beta tomorrow you can try. Sorry to jump back and forth here. I have to again correct my previous statement: With the latest version of dmd/druntime/phobos (2.062 from git), this bug does occur! But only when you compile and run separately. When you use dmd -run, both versions with and without -O work fine. This is quite weird. So: dmd -O brent_test.d ./brent_test should produce a different outcome than dmd brent_test.d ./brent_test I will try use bisect to find out when this bug was introduced. Stephan -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2992] std.typecons has unnecessary thread local globals
http://d.puremagic.com/issues/show_bug.cgi?id=2992 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com Resolution|LATER |WORKSFORME --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 07:16:23 PST --- They're now manifest constants. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9348] tmpl!arg syntax followed by !is or !in
http://d.puremagic.com/issues/show_bug.cgi?id=9348 --- Comment #2 from github-bugzi...@puremagic.com 2013-01-25 07:33:02 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e127a7d694cd99feca52fedf9c5f8fedc37776eb fix Issue 9348 - tmpl!arg syntax followed by !is or !in https://github.com/D-Programming-Language/dmd/commit/d1af0a7534f5b580a3b61b23163573b642ce40f9 Merge pull request #1507 from 9rnsr/fix9348 Issue 9348 - tmpl!arg syntax followed by !is or !in -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9348] tmpl!arg syntax followed by !is or !in
http://d.puremagic.com/issues/show_bug.cgi?id=9348 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC||c...@dawg.eu Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3252] undefined reference to package function called from an interface
http://d.puremagic.com/issues/show_bug.cgi?id=3252 --- Comment #6 from Diggory diggory.ha...@gmail.com 2013-01-25 09:41:59 PST --- Agreed, except that I guess package (and private) functions should be legal in an interface in the first place. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #6 from Walter Bright bugzi...@digitalmars.com 2013-01-25 10:37:02 PST --- When I compile and run separately, it works fine. You should also clarify whether you are using -m64 or not. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #7 from Stephan stephan.schiff...@mac.com 2013-01-25 10:43:26 PST --- Right, I use the 64bit model. And I tested this on OSX and on linux, with same outcomes on both platforms. It's frustating that you can't reproduce. Thanks for responding quickly on this anyway. I will see what I can find out with bisect. Stephan -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9336] Writeln is unable to print address of shared variable
http://d.puremagic.com/issues/show_bug.cgi?id=9336 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull CC||andrej.mitrov...@gmail.com AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 10:53:02 PST --- https://github.com/D-Programming-Language/phobos/pull/1098 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9325] writeln of const class instance
http://d.puremagic.com/issues/show_bug.cgi?id=9325 --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 11:22:21 PST --- It's a problem with toString being non-const in the root Object class. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7879] writeln of struct array with not const toString()
http://d.puremagic.com/issues/show_bug.cgi?id=7879 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 11:25:49 PST --- *** Issue 9325 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 9325] writeln of const class instance
http://d.puremagic.com/issues/show_bug.cgi?id=9325 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 11:25:49 PST --- Same as Issue 7879. *** This issue has been marked as a duplicate of issue 7879 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7879] format of class with not const toString()
http://d.puremagic.com/issues/show_bug.cgi?id=7879 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com Platform|x86 |All Summary|writeln of struct array |format of class with not |with not const toString() |const toString() OS/Version|Windows |All --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 11:26:57 PST --- Renamed title because it's really a problem with Object.toString being non-const which causes the issue. (also the title mentions structs instead of classes). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6989] Implement toString for std.concurrency.Tid
http://d.puremagic.com/issues/show_bug.cgi?id=6989 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 11:42:52 PST --- Hmm it looks like there isn't such a thing as a cross-platform thread-identifier (at least not in Druntime). Personally I like the idea of having named threads, where the name would be stored in a Tid. So you could do things like: spawn(workThread, func, args); where the first pointer argument is the function. It might help with debugging, e.g. inspecting a Tid of a LinkTerminated exception could tell you which named thread threw the exception. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4124] toString() for BitArray and more
http://d.puremagic.com/issues/show_bug.cgi?id=4124 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-01-25 11:50:14 PST --- It can use a simple representation like the Python bitarray: 010100101011 What about this instead: 0101_0010_1010_0001 I think it would also be useful to be able to initialize a bitarray with an integral literal, e.g.: BitArray bta = bitArray!0101_0010_1010_0001; It would statically check that all digits are 0 or 1 (is there a bit twiddling trick for this?). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4124] toString() for BitArray and more
http://d.puremagic.com/issues/show_bug.cgi?id=4124 --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 11:50:35 PST --- (In reply to comment #2) It can use a simple representation like the Python bitarray: 010100101011 That should have been a quote. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9390] Option for verbose regular expressions
http://d.puremagic.com/issues/show_bug.cgi?id=9390 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added CC||dmitry.o...@gmail.com --- Comment #1 from Dmitry Olshansky dmitry.o...@gmail.com 2013-01-25 12:13:45 PST --- How about adding the common extensions that is called comments inside regular expression. I can't recall synatx off-hand but it's something like: (?# some comment that is ignored) Plus you can already use any of the follwoing: auto pattern - rthe first piece // comment rthe second piece //comment 2 ... r the last piece; //last comment Or if implicit concatenation feels too dirty: auto pattern - rthe first piece // comment ~ rthe second piece //comment 2 ... ~ r the last piece; //last comment Either way free-form regex + top-level explanatory note is enough by my standards. The rationale is if you have to explan every piece in isolation then it's one of 2 cases: you are explaning machanics to people that don't know what regex is (and it's wrong) or the regex pattern is too darn complex for its own good. Since this is enhancement request I hereby propose 2 ways to solve it: close as won't fix or add the aformentioned extension for comments (that at least is more or less common). I'm not going to add another option that messes with syntax rules. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7260] g on default in std.regex
http://d.puremagic.com/issues/show_bug.cgi?id=7260 --- Comment #5 from Dmitry Olshansky dmitry.o...@gmail.com 2013-01-25 12:22:46 PST --- (In reply to comment #4) If changing std.regex.regex is not possible, then an alternative solution is to introduce the new little function std.regex.re, that repeats on default, that is like: re(someString) === regex(someString, g) re(someString, d) === regex(someString, dg) Frankly this is stupid (sorry). Obviously the wrong turn is that people (rightfully so) associate find all vs find first with operation that is match/replace not the regex as in the pattern itself. Personally I think that we better go with explicit overrides on match/replace/etc. and very slowly deprecate the g switch. Then how the override will look like is up for debate. match(someString, pattern).all //range of all matches match(someString, pattern).first //only the first one match(someString, pattern) // using the g flag to decide Or pass the override as optional parameter to match: match(someString, pattern, Regex.all); match(someString, pattern, Regex.first); match(someString, pattern); //use the flag I'll probably open a poll to pick the better one. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6480] std.array.array can't handle const
http://d.puremagic.com/issues/show_bug.cgi?id=6480 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||WORKSFORME --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 14:22:00 PST --- Works in 2.060+. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6614] std.traits should have an isFinal template
http://d.puremagic.com/issues/show_bug.cgi?id=6614 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 15:00:11 PST --- https://github.com/D-Programming-Language/phobos/pull/1099 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9269] [2.061] rdmd -unittest fails with lcurl not found
http://d.puremagic.com/issues/show_bug.cgi?id=9269 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #9 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 15:29:08 PST --- Should be fixed. Reopen if necessary. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9206] std.exception.isValidEnumValue
http://d.puremagic.com/issues/show_bug.cgi?id=9206 --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 15:53:47 PST --- (In reply to comment #0) @property bool isCompleteIntervalEnum(E)() pure nothrow if (is(E == enum)) { static if (isIntegral!E || isSomeChar!E) { return EnumMembers!E.length == (E.max - E.min + 1); } else { return false; } } That's an interesting optimization. bool isValidEnumValue(E)(E e) pure nothrow if (is(E == enum)) { static if (isCompleteIntervalEnum!E) { return e = E.min e = E.max; // Optimization. } else { return [EnumMembers!Foo].canFind(e); } } A mixed-in switch will be slightly faster in the else clause, except in the case of floating-point which can't be used with switches. Anyway I think it's worth adding. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9394] New: ABI for static arrays is outdated
http://d.puremagic.com/issues/show_bug.cgi?id=9394 Summary: ABI for static arrays is outdated Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 16:14:49 PST --- Quote: - int[3] abc; - $(P Passing abc to functions results in these implicit conversions:) - void func(int[3] array); // actually reference toarray[3] ofint void func(int* p); // abc is converted to a pointer // to the first element void func(int[] array); // abc is converted to a dynamic array - w.r.t. comments: For the first func: This is only true in D1. For the second func: I didn't even know worked in D2. But I don't see the benefit of such a conversion (perhaps interfacing with C?). For he third func: I thought we always had to use a slice, but it seems to work without it. How come? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8597] UFCS fails when used with a pointer to enum and implicit dereferencing
http://d.puremagic.com/issues/show_bug.cgi?id=8597 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-01-25 16:22:11 PST --- I think this is deliberate and it's unrelated to enums: int ufcs(int i) { return 0; } void main() { auto i = 0; auto ptrInt = i; auto a = ptrInt.ufcs(); // error } Same with structs. There was a similar issue opened where someone made a rationale, it was about not wanting to accidentally pass structs by value, or something like that. I'll wait for someone to give a better response. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9395] New: Allow deprecated statement in enum members
http://d.puremagic.com/issues/show_bug.cgi?id=9395 Summary: Allow deprecated statement in enum members Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 17:48:41 PST --- Let's say you have an existing enum in your library API: enum SpanMode { depth, breadth, shallow, } At some point you may decide you want to rename some of the members, but want to avoid code breakage for at least some time. You could introduce additional members which have the same values as the old ones: enum SpanMode { deep, // new wide, // new shallow, depth = deep, // old breadth = wide, // old } This will work with switches, final switches, to!string, etc (although code that depends on EnumMembers!E.length could potentially break depending on what it does). Don't mind the naming choice (it's just an example), but it would be useful to allow a deprecated statement in there, ala: enum SpanMode { deep, wide, shallow, deprecated(Please use SpanMode.deep) depth = deep, deprecated(Please use SpanMode.wide) breadth = wide, } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9396] New: Wrong line number when assigning nested enum to struct
http://d.puremagic.com/issues/show_bug.cgi?id=9396 Summary: Wrong line number when assigning nested enum to struct Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 18:06:38 PST --- This is invalid code, but the diagnostic error is on line 9 instead of line 14: enum E { mem } struct S { E e; enum mem = E.mem; // L9 } void main() { S s = S.mem; // L14 } $ test.d(9): Error: cannot implicitly convert expression (cast(E)0) of type E to S -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9397] New: Size error with struct with ctor and self-typed nested enum
http://d.puremagic.com/issues/show_bug.cgi?id=9397 Summary: Size error with struct with ctor and self-typed nested enum Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-25 18:53:53 PST --- struct S { this(int i) { } int i; enum s = S(0); // L5: fail } void main() { } Error: cannot create a struct until its size is determined This used to be a wrong-code bug (see Issue 8741), but now it's an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---