[Issue 7958] New: Uniform Function Call fails if class defined in unittest body
http://d.puremagic.com/issues/show_bug.cgi?id=7958 Summary: Uniform Function Call fails if class defined in unittest body Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: thelastmamm...@gmail.com --- Comment #0 from thelastmamm...@gmail.com 2012-04-20 23:30:22 PDT --- //this works class A{ int x; } int fun(A a){return a.x;} void main(){A a=new A; auto x=a.fun;} //this doesn't work: unittest{ class A{ int x; } int fun(A a){return a.x;} A a=new A; auto x=a.fun; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6327] Internal error: ..\ztc\cgcv.c 206
http://d.puremagic.com/issues/show_bug.cgi?id=6327 --- Comment #6 from ante...@freemail.hu 2012-04-20 23:42:09 PDT --- In 2.057, this bug still exists. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7959] New: dmd compiler crashes with internal error when main() redefined
http://d.puremagic.com/issues/show_bug.cgi?id=7959 Summary: dmd compiler crashes with internal error when main() redefined Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: thelastmamm...@gmail.com --- Comment #0 from thelastmamm...@gmail.com 2012-04-20 23:41:46 PDT --- cat fun.d module fun; void main(){} cat main.d module main; import fun; void main(){} rdmd main Internal error: ../ztc/machobj.c 2149 //instead of gracefully giving an error that main shouldn't be defined elsewhere This is specific to main, as the following compiles fine: cat fun.d module fun; void fun(){} cat main.d module main; import fun; void fun(){} void main(){} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7878] A problem with purity and general templated algorithms
http://d.puremagic.com/issues/show_bug.cgi?id=7878 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-04-20 23:47:09 PDT --- *** Issue 5505 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 5505] std.functional: Fix for possible lurking bug replace complex return type with auto
http://d.puremagic.com/issues/show_bug.cgi?id=5505 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||DUPLICATE --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-04-20 23:47:09 PDT --- Simplifying binaryReverseArgs is now proposed in the pull for bug 7878. https://github.com/D-Programming-Language/phobos/pull/544 So I'd merge this to 7878. *** This issue has been marked as a duplicate of issue 7878 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5358] std.functional.binaryReverseArgs missing from documentation
http://d.puremagic.com/issues/show_bug.cgi?id=5358 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Summary|std.functional: |std.functional.binaryRevers |binaryReverseArgs |eArgs missing from |toDelegate missing from |documentation |documentation | --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-04-20 23:52:15 PDT --- Changed title, and added change for this issue. https://github.com/D-Programming-Language/phobos/pull/544 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7660] toImpl conflict in std.conv
http://d.puremagic.com/issues/show_bug.cgi?id=7660 Kenji Hara k.hara...@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 6327] Internal error: ..\ztc\cgcv.c 206
http://d.puremagic.com/issues/show_bug.cgi?id=6327 --- Comment #7 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 00:32:14 PDT --- Please could you provide a test case or at the very least a compiling version of your source code ? Just saying I got this bug somewhere is useless: developers cannot investigate without reproducing the bug, and they can't reproduce it without a minimum information. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6945] ICE(expression.c) arrays of missing symbols
http://d.puremagic.com/issues/show_bug.cgi?id=6945 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 01:11:49 PDT --- This one gives correct compilation messages on 2.059: PS E:\DigitalMars\dmd2\samples rdmd bug bug.d(1): Error: undefined identifier A bug.d(1): Error: undefined identifier B -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7659] Reopen a file
http://d.puremagic.com/issues/show_bug.cgi?id=7659 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Depends on||7022 --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 01:40:31 PDT --- The issue here is f.close() erases f.name, making it impossible to reopen f by name; unless it's stored in a separate variable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7236] Protected class members in different file inaccessible
http://d.puremagic.com/issues/show_bug.cgi?id=7236 --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 01:47:16 PDT --- I think this is a major bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7236] Protected class members in different file inaccessible
http://d.puremagic.com/issues/show_bug.cgi?id=7236 --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 02:28:51 PDT --- It also works with the following calls: f(), this.f() and super.f() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7959] dmd compiler crashes with internal error when main() redefined
http://d.puremagic.com/issues/show_bug.cgi?id=7959 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||dmitry.o...@gmail.com Resolution||DUPLICATE --- Comment #1 from Dmitry Olshansky dmitry.o...@gmail.com 2012-04-21 03:05:35 PDT --- *** This issue has been marked as a duplicate of issue 5634 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5634] ICE(machobj.c) on Mac OS X when there are multiple 'main's
http://d.puremagic.com/issues/show_bug.cgi?id=5634 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added CC||thelastmamm...@gmail.com --- Comment #3 from Dmitry Olshansky dmitry.o...@gmail.com 2012-04-21 03:05:35 PDT --- *** Issue 7959 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 7897] Problem with alias template parameter
http://d.puremagic.com/issues/show_bug.cgi?id=7897 --- Comment #9 from Manu turkey...@gmail.com 2012-04-21 05:08:49 PDT --- (In reply to comment #8) (In reply to comment #7) Oooohkay, so now we get to the bottom of it. Right, well I didn't realise that restriction. I just assumed any statically addressable variable was alias-able. Any *symbol* is aliasable. It isn't about addresses. Yeah I see now, but I don't think that's what people intuitively expect. I've asked for help on various manifestations of this matter on IRC quite a few times, and so far, zero out of all the people who have helped me seem to understand that either. They almost all just said something like yeah it seems to be a bit finicky, have you tried this, try passing a this kind of thing, try changing it this way, etc .. suggesting that nobody had any understanding of what they were trying to do, just fiddling with it until it stopped complaining. Perhaps it would be a good idea to add some informative error message stating the limitation. The whinge about 'this' certainly lost all meaning to me at least, I was absolutely convinced 'this' was perfectly calculable at compile time, and it should work. There was no mention of symbols. So this is a feature request then, not a bug. There's still technically no reason it shouldn't work, it's just not quite how alias is written? How much trouble would it be to extend 'alias' to include an offset value? This is a significant redesign of what alias is. :/ .. I think though that the mistake I made is what most people expect should be possible. At least all those that have tried to help me with it so far. Another alternative could be to just invent the appropriate symbol when a reference like this appears. Symbol names follow the d scoping patterns right? In this case, the symbol would just be my.module.thing.x (or with whatever mangling happens to appear in D symbols). Can't you just pass a pointer around? I don't think I can get a pointer to TLS data at compile time can I? Using the alias still allows the compiler to generate the correct TLS dereferencing code. In the cases where I use __gshared I suppose I could, but I'm not sure this would simplify the code at all. I can imagine it being more difficult to follow than the mixin version. Carrying a pointer interferes with typeof(), it also interferes with the ability to do allMemers, getMember on the instance (as opposed to the type). getMember only works on aliases(?), so I think I would need to generate mixin code that uses the strings produced by allMembers to generate expressions that reference the data I'm interested in anyway. I'll have a go at it, see how far I get. But I can imagine the result being very similar to the mixin approach, and probably no simpler for a 3rd person to follow. A direct alias is certainly be the most clear and concise way to go. Is it impossible to invent a new symbol when this case is encountered like I suggest? That could be a simple solution that fits the existing model. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7341] writefln of strings array with size formatting
http://d.puremagic.com/issues/show_bug.cgi?id=7341 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 05:12:33 PDT --- Was writefln supposed to work or arrays ? Here is what I get on 2.059: PS E:\DigitalMars\dmd2\samples rdmd bug.d object.Exception@E:\DigitalMars\dmd2\windows\bin\..\..\src\phobos\std\format.d(1886): Incorrect format specifier for range: %d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7363] Eponymous Template doesn't hide internal names in some cases with `static if`
http://d.puremagic.com/issues/show_bug.cgi?id=7363 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #5 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 05:24:00 PDT --- Compiles and runs on 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7385] Bad error message missing line number on invalid array op that isn't special cased
http://d.puremagic.com/issues/show_bug.cgi?id=7385 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 05:26:43 PDT --- The second test no longer prints an error on 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7414] Vector literal assignment doesn't work in global scope
http://d.puremagic.com/issues/show_bug.cgi?id=7414 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 05:35:27 PDT --- See also issue 7413 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7413] Vector literals don't work
http://d.puremagic.com/issues/show_bug.cgi?id=7413 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #5 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 05:35:44 PDT --- See also issue 7414 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7363] Eponymous Template doesn't hide internal names in some cases with `static if`
http://d.puremagic.com/issues/show_bug.cgi?id=7363 Kenji Hara k.hara...@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 7961] New: Add support for C++ namespaces
http://d.puremagic.com/issues/show_bug.cgi?id=7961 Summary: Add support for C++ namespaces Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dejan.le...@gmail.com --- Comment #0 from Dejan Lekic dejan.le...@gmail.com 2012-04-21 05:57:52 PDT --- On 12/14/2011 1:47 PM, Dejan Lekic wrote: As subject says. I am pretty much happy with the current C++ support. The only thing I need is to be able to call functions from namespace(s). Any plans to add this feature? Walter's response: I hadn't planned to, but it's a good idea. I suggest adding it as an enhancement request on bugzilla. I forgot about it, but lately I need namespace support again, so I am filing this feature request here. :) This is, I believe, a very important feature as many people deal with C++ libraries lately. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7622] Qualified imports inside functions don't work for real
http://d.puremagic.com/issues/show_bug.cgi?id=7622 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added Status|NEW |RESOLVED CC||lovelyd...@mailmetrash.com Resolution||DUPLICATE --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:07:41 PDT --- *** This issue has been marked as a duplicate of issue 7494 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7491] import symbol name unavailable in class scope
http://d.puremagic.com/issues/show_bug.cgi?id=7491 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:09:43 PDT --- See also issue 7494 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7494] Selective import does not work inside a function
http://d.puremagic.com/issues/show_bug.cgi?id=7494 --- Comment #7 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:07:41 PDT --- *** Issue 7622 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 7632] byValue() for associative arrays doesn't return the correct values
http://d.puremagic.com/issues/show_bug.cgi?id=7632 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #5 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:13:30 PDT --- Works on 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7341] writefln of strings array with size formatting
http://d.puremagic.com/issues/show_bug.cgi?id=7341 --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-04-21 06:26:55 PDT --- (In reply to comment #0) D2 code: import std.stdio; void main() { int[] a1 = [1, 10, 5]; writefln(%12d, a1); string[] a2 = [red, yellow, ya]; writefln(%12s, a2); } Output: [ 1, 10,5] [red, yellow, ya] But I expect an output more like: [ 1, 10,5] [ red, yellow, ya] If you want to give format specifier for elements explicitly, you should use compound format specifier (It is %( and %).) writefln([%(%12d, %)], [1, 10, 5]); writefln([%(%12s, %)], [red, yellow, ya]); But, this code output: [ 1, 10,5] [red, yellow, ya] Because, string elements and character elements are treated specially. They are quoted, and other specifications are ignored. https://github.com/D-Programming-Language/phobos/blob/master/std/format.d#L1930 But, I agree it is debatable thing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7244] Access Violation with optimized build when using memory-mapped file
http://d.puremagic.com/issues/show_bug.cgi?id=7244 --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:28:21 PDT --- See also issue 7689 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7709] Segfault when trying to use any property of an AA, which is the return type of a CTFE function with inout parameters.
http://d.puremagic.com/issues/show_bug.cgi?id=7709 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:50:05 PDT --- Works with 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7710] Segmentation fault when assigning function to delegate variable
http://d.puremagic.com/issues/show_bug.cgi?id=7710 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 06:51:07 PDT --- With 2.059 Win32: PS E:\DigitalMars\dmd2\samples rdmd bug.d bug.d(7): Error: expression foo() is void and has no value -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7710] Segmentation fault when assigning function to delegate variable
http://d.puremagic.com/issues/show_bug.cgi?id=7710 Alex R�nne Petersen xtzgzo...@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 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 07:01:54 PDT --- Where is it said in the spec that this should be possible ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #3 from Manu turkey...@gmail.com 2012-04-21 07:06:33 PDT --- (In reply to comment #2) Where is it said in the spec that this should be possible ? As I've been lead to believe, final shouldn't be applicable to data members. Apparently the reason you can't use 'final:' (because it complains when it encounters a variable) is a remnant of D1. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 Dejan Lekic dejan.le...@gmail.com changed: What|Removed |Added CC||dejan.le...@gmail.com --- Comment #4 from Dejan Lekic dejan.le...@gmail.com 2012-04-21 07:30:33 PDT --- This is not a bug - you can't use final with variables. Examine following D2 code: import std.stdio; class Issue7724 { /+--+ | Uncomment to get ...someValue final cannot be applied to variable error. final: int someValue; int setValue(int argValue) { someValue = argValue; } int getValue() { return someValue; } +--+/ // Correct: int someValue; final: void setValue(int argValue) { someValue = argValue; } int getValue() { return someValue; } } int main() { return 0; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7632] byValue() for associative arrays doesn't return the correct values
http://d.puremagic.com/issues/show_bug.cgi?id=7632 --- Comment #6 from Erik Johansson Andersson exe...@gmail.com 2012-04-21 07:51:45 PDT --- (In reply to comment #5) Works on 2.059 Still doesn't work for me for some reason. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7632] byValue() for associative arrays doesn't return the correct values
http://d.puremagic.com/issues/show_bug.cgi?id=7632 --- Comment #7 from Erik Johansson Andersson exe...@gmail.com 2012-04-21 08:17:23 PDT --- Are you by any chance using -m32, or something? Because this bug has been confirmed by a 64-bit FreeBSD user, using the 2.059 release, as well as the latest git revision. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7341] writefln of strings array with size formatting
http://d.puremagic.com/issues/show_bug.cgi?id=7341 Stewart Gordon s...@iname.com changed: What|Removed |Added CC||s...@iname.com --- Comment #3 from Stewart Gordon s...@iname.com 2012-04-21 08:48:54 PDT --- The reason for the original behaviour seems to be that the width specified for %s is taken to be the width to which the whole argument is formatted, not the width to which each element of the array is formatted. But I'm getting the same error as SomeDude (DMD 2.059, Win32). Kenji - what setup do you have that's giving a different result? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 Stewart Gordon s...@iname.com changed: What|Removed |Added CC||s...@iname.com --- Comment #5 from Stewart Gordon s...@iname.com 2012-04-21 08:58:12 PDT --- The debate is one of whether an attribute specified with the colon syntax is meant to apply to _everything_ that follows it until the end of the scope, or only those members to whose entity type it is applicable. When I filed issue 3118, I argued that the latter is reasonable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #6 from Manu turkey...@gmail.com 2012-04-21 09:39:11 PDT --- (In reply to comment #4) This is not a bug - you can't use final with variables. Examine following D2 code: import std.stdio; class Issue7724 { /+--+ | Uncomment to get ...someValue final cannot be applied to variable error. final: int someValue; int setValue(int argValue) { someValue = argValue; } int getValue() { return someValue; } +--+/ // Correct: int someValue; final: void setValue(int argValue) { someValue = argValue; } int getValue() { return someValue; } } int main() { return 0; } It's inconsistent to allow superfluous instance of some attributes, but not others. static int x; at global scope is silently ignored. final applied to data members should be equally ignored, but rather, attributes with colon probably just shouldn't be applied to things that they're not applicable to. Otherwise you'll end up with all sorts of class organisation mess when you consider a few attributes together. I'm not into the idea that the language should insist I break my class up according to arbitrary attributes, rather than keeping related things together, which I find far preferable. Also, declaring 'final:' at some arbitrary point in a class is hard to spot, and error prone (it might be missing). If it's the first thing in a class (like 'public:' often is in C++), then it's very easy to spot and validate. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7818] __traits(allMembers) issue?
http://d.puremagic.com/issues/show_bug.cgi?id=7818 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #5 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 09:58:38 PDT --- This compiles and runs fine under 2.059 Win32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6595] std.string.format() and sformat() are obsolete
http://d.puremagic.com/issues/show_bug.cgi?id=6595 --- Comment #3 from github-bugzi...@puremagic.com 2012-04-21 10:00:17 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/1b75b2b2890fe22fd24db4c693d718426d576f74 Merge pull request #231 from 9rnsr/fix6595 Issue 6595 - std.string.format() and sformat() are obsolete -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7818] __traits(allMembers) issue?
http://d.puremagic.com/issues/show_bug.cgi?id=7818 --- Comment #6 from Manu turkey...@gmail.com 2012-04-21 10:12:19 PDT --- (In reply to comment #5) This compiles and runs fine under 2.059 Win32 Yes, that conclusion was already made in the prev posts. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7833] [2.059 Beta] Changelog should clearly mention struct literal/opCmp/opEquals/toHash changes
http://d.puremagic.com/issues/show_bug.cgi?id=7833 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #5 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 10:16:19 PDT --- On 2.059, the test compiles, but now, swapping struct with class, we get: PS E:\DigitalMars\dmd2\samples rdmd bug.d bug.d(16): Error: no property 'opCall' for type 'bug.Foo' bug.d(16): Error: no property 'opCall' for type 'bug.Foo' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7834] Assign x%int to int without cast
http://d.puremagic.com/issues/show_bug.cgi?id=7834 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 10:25:02 PDT --- (In reply to comment #1) Now I think this is supposed to work, so it's not an enhancement request. I don't see where in the spec ulong can be promoted to int. http://dlang.org/type.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #7 from Dejan Lekic dejan.le...@gmail.com 2012-04-21 10:28:29 PDT --- @Manu: I see your point. However, I disagree - one should learn the language, and understand where and how final: can be used. I have no problems with the current situation. Compiler also generates a helpful error message that can be understood by anyone. I personally never use public: final: private: etc... I prefer public{}, private{}, etc. or use these per-declaration. @Stewart Gordon Neither are good - the second approach makes it possible to easily make a mistake if developer is not pedantic enough. Say a class has buch of various methods - and in the middle of it developer decides to add a variable... I know - bad programming practice but still possible... However, developers typically group variables and methods, so I guess it is OK. As I said, I like the current approach when compiler generates a descriptive error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7833] [2.059 Beta] Changelog should clearly mention struct literal/opCmp/opEquals/toHash changes
http://d.puremagic.com/issues/show_bug.cgi?id=7833 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added CC||dmitry.o...@gmail.com --- Comment #6 from Dmitry Olshansky dmitry.o...@gmail.com 2012-04-21 10:30:02 PDT --- Class instances are created with new or emplace function. Foo() won't work for classes by design. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7845] Internal error: ../ztc/cgcs.c 354
http://d.puremagic.com/issues/show_bug.cgi?id=7845 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 10:48:01 PDT --- This works correctly on 2.059 WinXP 32. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7846] Forward referenced storage class is not applied in certain cases
http://d.puremagic.com/issues/show_bug.cgi?id=7846 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:03:06 PDT --- I don't understand. I have to add const int x; at the beginning in order for this test to pass. Then I get: PS E:\DigitalMars\dmd2\samples dmd -c bug.d const(int) false bug.d(11): Error: declaration bug.main.x is already defined const(int) false -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7849] Manifest constants don't resolve the polysemous literal type
http://d.puremagic.com/issues/show_bug.cgi?id=7849 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:05:30 PDT --- Compiles with 2.059 Win32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7898] [CTFE] std.algorithm:copy fails when used with two arrays
http://d.puremagic.com/issues/show_bug.cgi?id=7898 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Severity|normal |regression --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:28:51 PDT --- Upgraded to regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #8 from Manu turkey...@gmail.com 2012-04-21 11:30:09 PDT --- (In reply to comment #7) @Manu: I see your point. However, I disagree - one should learn the language, and understand where and how final: can be used. I have no problems with the current situation. Compiler also generates a helpful error message that can be understood by anyone. I personally never use public: final: private: etc... I prefer public{}, private{}, etc. or use these per-declaration. I think it's safe to say that the preference of keeping associated stuff together is nothing to do with learning the language or not. This is culture, taste, and company standards. I need to reiterate the consistency issue. Other superfluous attributes appear to be silently ignored where they are not applicable. __gshared makes no sense on a function, but it doesn't complain, as is static, shared, immutable, etc. It's only final that complains, and that's very annoying, because it's the only one I'm passionately insistent about. I'd like to think it should be fixed to be consistent with all the others for consistency's sake alone. Making me happy would be a nice side effect :) From a subjective point of view, I don't like the introduction of an extra indentation level by attribute{}, and why supply 2 ways if not to support user preference? I'd prefer the language forcefully dictate how I arrange my code as little as possible. 95% of functions are final, and as such, for us, it should always be within the first couple of lines in the class. It would be a company policy that it were the first line in every class if I could explicitly state virtual. However as is now, we ideally declare 1-2 virtuals, then final:, and then everything else, with the class laid out however is most naturally readable, and logical to follow. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7900] CTFE Internal error with -inline and associative arrays
http://d.puremagic.com/issues/show_bug.cgi?id=7900 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Platform|x86_64 |All OS/Version|Linux |All --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:31:15 PDT --- Same issue on Win32 2.059. The windows version gives the file/line of the assertion, though. PS E:\DigitalMars\dmd2\samples rdmd -inline bug.d bug.d(21): Error: CTFE internal error: illegal value P▄S.children Assertion failure: 'isCtfeValueValid(newval)' on line 6678 in file 'interpret.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7852] Error: forward reference depending on order of source files
http://d.puremagic.com/issues/show_bug.cgi?id=7852 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:37:38 PDT --- See also issue 7904 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7904] Template instantiation failure depending on compilation order
http://d.puremagic.com/issues/show_bug.cgi?id=7904 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:36:46 PDT --- This looks like a duplicate of issue 7852, although the error messages are different. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7895] Internal compiler error
http://d.puremagic.com/issues/show_bug.cgi?id=7895 Manu turkey...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #2 from Manu turkey...@gmail.com 2012-04-21 11:40:09 PDT --- So it does. Resolved :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7874] [CTFE] internal error: unsupported assignment (x OP= y) = z
http://d.puremagic.com/issues/show_bug.cgi?id=7874 --- Comment #3 from timon.g...@gmx.ch 2012-04-21 11:44:38 PDT --- (In reply to comment #2) Actually, the first example gives on 2.059 PS E:\DigitalMars\dmd2\samples dmd -c bug bug.d(2): Error: function bug.foo (int x) is not callable using argument types () bug.d(2): Error: expected 1 function arguments, not 0 That is a typo. Fixed test case: int foo(int x){return ++x=1;} enum bar = foo(0); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7849] Manifest constants don't resolve the polysemous literal type
http://d.puremagic.com/issues/show_bug.cgi?id=7849 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #4 from timon.g...@gmx.ch 2012-04-21 11:45:53 PDT --- Reopening because there probably should be a regression test. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7883] Compiler crashes with double inheritance and function contract
http://d.puremagic.com/issues/show_bug.cgi?id=7883 --- Comment #5 from �yvind Grotmol dl...@grotmol.net 2012-04-21 11:52:23 PDT --- (In reply to comment #4) It compiles and runs on DMD 2.059 Win32 Hi, Could you check this one also please? By mistake the file I uploaded had commented out one of the contracts, and then the file does indeed work. It is only when both contracts are in place, that dmd crashes. class A { int foo(int i) out (result) { } body { return 1; } } class B : A { int foo(int i) out (result) { } body { return 1; } } class C : B { int foo(int i) { return 1; } } void main() { } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7908] Array operations fail when compiled with -d flag
http://d.puremagic.com/issues/show_bug.cgi?id=7908 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Platform|x86 |All OS/Version|Linux |All --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:54:37 PDT --- Also fails on DMD 2.059 Win32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7912] Cannot read compile time variable at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=7912 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:57:38 PDT --- Invalid issue ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7341] writefln of strings array with size formatting
http://d.puremagic.com/issues/show_bug.cgi?id=7341 --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:07:22 PDT --- (In reply to comment #3) But I'm getting the same error as SomeDude (DMD 2.059, Win32). Kenji - what setup do you have that's giving a different result? He wrote it. The code that's supposed to work is: import std.stdio; void main() { writefln([%(%12d, %)], [1, 10, 5]); writefln([%(%12s, %)], [red, yellow, ya]); } Not the original test example. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7632] byValue() for associative arrays doesn't return the correct values
http://d.puremagic.com/issues/show_bug.cgi?id=7632 --- Comment #8 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:10:36 PDT --- Oh, I should have precised I'm using the Win32 release. I normally do it, but I forgot. Apologies. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7883] Compiler crashes with double inheritance and function contract
http://d.puremagic.com/issues/show_bug.cgi?id=7883 --- Comment #6 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:13:38 PDT --- (In reply to comment #5) (In reply to comment #4) It compiles and runs on DMD 2.059 Win32 Hi, Could you check this one also please? By mistake the file I uploaded had commented out one of the contracts, and then the file does indeed work. It is only when both contracts are in place, that dmd crashes. Yes, it crashes DMD Win32 here too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #9 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:21:57 PDT --- I'm not fond of the C++ syntax either. But it's a matter of taste, I guess. Either way, unless you can point it in the spec, I think this issue should be reduced from critical to enhancement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #10 from Manu turkey...@gmail.com 2012-04-21 12:30:41 PDT --- (In reply to comment #9) I'm not fond of the C++ syntax either. But it's a matter of taste, I guess. Either way, unless you can point it in the spec, I think this issue should be reduced from critical to enhancement. It's clearly a bug. All other attributes work as expected. This is the odd one out. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7917] [ICE] (toir.c 178) with nested function
http://d.puremagic.com/issues/show_bug.cgi?id=7917 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Platform|x86_64 |All OS/Version|Linux |All --- Comment #7 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:31:03 PDT --- Also happens on 2.059 Win32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7919] Sample code works on GDC but fails with DMD
http://d.puremagic.com/issues/show_bug.cgi?id=7919 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Severity|normal |regression -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 Bernard Helyer blood.of.l...@gmail.com changed: What|Removed |Added CC||blood.of.l...@gmail.com --- Comment #11 from Bernard Helyer blood.of.l...@gmail.com 2012-04-21 12:34:19 PDT --- Seeing as DMD ignores most no-op attributes, I have no idea why this is the one where it suddenly decides that it should generate an error. I think final on variables should just be ignored, in keeping with other attributes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7926] segmentation fault on recursive string mixin
http://d.puremagic.com/issues/show_bug.cgi?id=7926 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:36:27 PDT --- On 2.059 Win32 PS E:\DigitalMars\dmd2\samples dmd -c bug.d Stack overflow which I guess is what's to be expected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7938] Stack overflow/access violation when throwing exceptions from fibers
http://d.puremagic.com/issues/show_bug.cgi?id=7938 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #6 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 12:46:26 PDT --- (In reply to comment #5) Sorry for the confusion - I'm not used to assuming that breaking in a debugger could cause side-effects :) Actually, on concurrent programming, it does, and the debugger is practically useless, because you won't be able to see concurrent accesses. You should really use traces. Anyway, both test codes compile and run fine on my machine (2.059 Win32). Should we close ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7940] CTFE breaks
http://d.puremagic.com/issues/show_bug.cgi?id=7940 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Platform|x86_64 |All OS/Version|Linux |All --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 13:07:06 PDT --- Same code as above, very slightly simplified. - import std.typecons : Tuple; import std.array : appender; import std.stdio : writeln; struct S { Tuple!(uint, double)[] _data; alias _data this; } private auto gen(K, V)(V[K] data) { alias Tuple!(K, V) T; auto app = appender!(T[]); foreach(k, v; data) app.put(T(k, v)); return app.data; } auto s(double[uint] data) { return S(gen!(uint, double)(data)); } void main() { static S s1 = s([1: 12.0, 5: 4.6, 3: 9.99]); S s2= s([1: 12.0, 5: 4.6, 3: 9.99]); writeln(s1); writeln(s2); } -- PS E:\DigitalMars\dmd2\samples rdmd -g bug.d [Tuple!(uint,double)(0, nan), Tuple!(uint,double)(0, nan), Tuple!(uint,double)(0, nan)] [Tuple!(uint,double)(1, 12), Tuple!(uint,double)(3, 9.99), Tuple!(uint,double)(5, 4.6)] If we remove the static, it works. If we replace the appender by an array in: import std.typecons : Tuple; import std.array : appender; import std.stdio : writeln; struct S { Tuple!(uint, double)[] _data; alias _data this; } private auto gen(K, V)(V[K] data) { alias Tuple!(K, V) T; T[] app; foreach(k, v; data) app ~= T(k, v); return app; } auto s(double[uint] data) { return S(gen!(uint, double)(data)); } void main() { static S s1 = s([1: 12.0, 5: 4.6, 3: 9.99]); S s2= s([1: 12.0, 5: 4.6, 3: 9.99]); writeln(s1); writeln(s2); } PS E:\DigitalMars\dmd2\samples rdmd -g bug.d [Tuple!(uint,double)(1, 12), Tuple!(uint,double)(5, 4.6), Tuple!(uint,double)(3, 9.99)] [Tuple!(uint,double)(1, 12), Tuple!(uint,double)(3, 9.99), Tuple!(uint,double)(5, 4.6)] If we remove the static: PS E:\DigitalMars\dmd2\samples rdmd -g bug.d [Tuple!(uint,double)(1, 12), Tuple!(uint,double)(3, 9.99), Tuple!(uint,double)(5, 4.6)] [Tuple!(uint,double)(1, 12), Tuple!(uint,double)(3, 9.99), Tuple!(uint,double)(5, 4.6)] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7962] New: std.regex: Captures.length() returns incorrect value
http://d.puremagic.com/issues/show_bug.cgi?id=7962 Summary: std.regex: Captures.length() returns incorrect value Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: marku...@gmail.com --- Comment #0 from Markus Dittrich marku...@gmail.com 2012-04-21 13:14:03 PDT --- It seems that Captures.length() from std.regex returns bogus lengths for empty captures (I might be using it improperly). Here's a simple example, the second match object claims length 2 while being empty. sh-4.2$ uname Linux sh-4.2$ dmd | grep DMD DMD64 D Compiler v2.059 sh-4.2$ cat test.d import std.regex; import std.stdio; int main() { auto r = regex(r(@\w+), g); writeln(match first string -- looks ok); string text1 = @This is a test; auto m1 = match(text1, r); auto myCapts1 = m1.captures; writeln(content: , myCapts1); writeln(is empty? , myCapts1.empty()); writeln(length: , myCapts1.length()); writeln(); writeln(match second string -- length seems wrong); string text2 = (his) is a test; auto m2 = match(text2, r); auto myCapts2 = m2.captures; writeln(content: , myCapts2); writeln(is empty? , myCapts2.empty()); writeln(length : , myCapts2.length()); return 0; } sh-4.2$ dmd test.d sh-4.2$ ./test match first string -- looks ok content: [@This, @This] is empty? false length: 2 match second string -- length seems wrong content: [] is empty? true length : 2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7948] std.range.zip broken with requireSameLength
http://d.puremagic.com/issues/show_bug.cgi?id=7948 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 13:18:33 PDT --- For convenience, same code as above: import std.algorithm; import std.range; void main(){ int[] a = [ 1, 2, 3 ]; string[] b = [ a, b, c ]; sort!(a[0] b[0])(zip(StoppingPolicy.requireSameLength, a, b)); assert(a == [ 3, 2, 1 ]); assert(b == [ c, b, a ]); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7949] [ICE] (cgcod.c) with SIMD array
http://d.puremagic.com/issues/show_bug.cgi?id=7949 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Platform|x86_64 |x86 Summary|DMD segfaults when |[ICE] (cgcod.c) with SIMD |compiling this |array OS/Version|Linux |All --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 13:25:23 PDT --- On 2.059 Win32 PS E:\DigitalMars\dmd2\samples rdmd bug.d Internal error: ..\ztc\cgcod.c 1447 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7951] DMD: Internal error: backend/cgxmm.c 567
http://d.puremagic.com/issues/show_bug.cgi?id=7951 --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 13:47:49 PDT --- Even more reduced: import std.stdio; import std.math; import core.simd; void main() { float[4] v1 = [1,2,3,4]; float[4] v2 = [1,2,3,4]; float4 f1, f2, f3; f1.array = v1; f2.array = v2; f3 = f1 + f2; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7953] DMD Error: variable r used before set when compiling with -O
http://d.puremagic.com/issues/show_bug.cgi?id=7953 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 13:56:42 PDT --- Please reduce your code to the minimum that shows the behaviour. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7962] std.regex: Captures.length() returns incorrect value
http://d.puremagic.com/issues/show_bug.cgi?id=7962 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added Keywords||pull CC||dmitry.o...@gmail.com --- Comment #1 from Dmitry Olshansky dmitry.o...@gmail.com 2012-04-21 14:11:59 PDT --- (In reply to comment #0) It seems that Captures.length() from std.regex returns bogus lengths for empty captures (I might be using it improperly). Here's a simple example, the second match object claims length 2 while being empty. Thanks for the detailed info. The problem is that Captures.length is hardwired to the number of sub captures + 1 which is fine as long as there is a match. For now you may use m.empty ? 0 : m.length as a workaround. Pull: https://github.com/D-Programming-Language/phobos/pull/548 P.S. Usage of e.g. length() is deprecated and fails with -property switch. Omit parens for @property members. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7953] DMD Error: variable r used before set when compiling with -O
http://d.puremagic.com/issues/show_bug.cgi?id=7953 --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 14:17:06 PDT --- I've reduced the test case to this: import core.simd; import std.conv; string gen(int D) { string s; s ~= r = __simd(XMM.ADDPS, v1,v2);; return res.ptr[~to!string(0)~] = r.ptr[~to!string(0)~];; } T[D] simdAdd(T, int D)(T[D] a1, T[D] a2) { T[D] res; float4 r; mixin(gen(D)); return res; } void main() { float[8] v1 = [1,2,3,4,1,2,3,4]; float[8] v2 = [1,2,3,4,1,2,3,4]; simdAdd(v1,v2); } but I can't reproduce the error message, so maybe I've overlooked something. However, interestingly, this compiles with -O flag and crashes the compiler without. PS E:\DigitalMars\dmd2\samples rdmd bug.d Internal error: ..\ztc\cg87.c 1699 PS E:\DigitalMars\dmd2\samples rdmd -O bug.d PS E:\DigitalMars\dmd2\samples -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7953] DMD Error: variable r used before set when compiling with -O
http://d.puremagic.com/issues/show_bug.cgi?id=7953 --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 14:19:31 PDT --- (In reply to comment #3) I've reduced the test case to this: ... but I can't reproduce the error message, so maybe I've overlooked something. However, interestingly, this compiles with -O flag and crashes the compiler without. PS E:\DigitalMars\dmd2\samples rdmd bug.d Internal error: ..\ztc\cg87.c 1699 PS E:\DigitalMars\dmd2\samples rdmd -O bug.d PS E:\DigitalMars\dmd2\samples The ICE may be related to issue 7951. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7874] [CTFE] internal error: unsupported assignment (x OP= y) = z
http://d.puremagic.com/issues/show_bug.cgi?id=7874 --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 14:36:01 PDT --- One could argue that the fact that such code is rejected is rather a good thing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3610] isNumeric(3.14w) is false.
http://d.puremagic.com/issues/show_bug.cgi?id=3610 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #6 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 14:55:45 PDT --- PS E:\DigitalMars\dmd2\samples rdmd bug.d bug.d(5): Error: function std.string.isNumeric is deprecated bug.d(6): Error: function std.string.isNumeric is deprecated Close with WONTFIX ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4311] Applying a template to a variadic template parameter in a templated function's parameter list breaks compilation
http://d.puremagic.com/issues/show_bug.cgi?id=4311 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:03:40 PDT --- Compiles on 2.059. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3610] isNumeric(3.14w) is false.
http://d.puremagic.com/issues/show_bug.cgi?id=3610 --- Comment #7 from Jonathan M Davis jmdavisp...@gmx.com 2012-04-21 15:12:25 PDT --- No. I don't think so. The one overload of isNumeric which hasn't been deprecated is the one that takes in char[]. With the deprecated ones removed, it'll be possible to make it work with in wchar[] and in dchar[] without breaking any code. It's the other crazy overloads which have to go and thus are deprecated. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4629] BufferedFile.printf() wants char[] as first argument
http://d.puremagic.com/issues/show_bug.cgi?id=4629 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:19:12 PDT --- Compiles on 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4656] stdio.readf does not ignore white space
http://d.puremagic.com/issues/show_bug.cgi?id=4656 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:22:11 PDT --- The original test case now produces this message: PS E:\DigitalMars\dmd2\samples rdmd bug.d 456 45646 std.conv.ConvException@E:\DigitalMars\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1779): Unexpected ' ' when converting from type LockingTextReader to type int -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4695] std.range.zip is broken
http://d.puremagic.com/issues/show_bug.cgi?id=4695 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:27:13 PDT --- Works on 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4697] std.demangle doesn't work correctly
http://d.puremagic.com/issues/show_bug.cgi?id=4697 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:28:20 PDT --- 2.059: PS E:\DigitalMars\dmd2\samples rdmd bug.d void bug.main().pure nothrow @safe int function(float, char)* a void bug.main().int[] b void bug.main().double c pure nothrow real std.math.cos(real) char[] std.utf.toUTF8(char[4], dchar) char[] std.string.sformat(char[], ...) PS E:\DigitalMars\dmd2\samples -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4737] typeid doesn't work for scoped enum with initializer
http://d.puremagic.com/issues/show_bug.cgi?id=4737 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:29:34 PDT --- Compiles and runs fine on 2.059 Win32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4785] auto return of a function with in contract
http://d.puremagic.com/issues/show_bug.cgi?id=4785 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #6 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:34:01 PDT --- DMD 2.059: PS E:\DigitalMars\dmd2\samples rdmd bug.d bug.d(1): function declaration without return type. (Note that constructors are always named 'this') bug.d(2): no identifier for declarator foo() PS E:\DigitalMars\dmd2\samples -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4803] std.range.chain with const string arguments
http://d.puremagic.com/issues/show_bug.cgi?id=4803 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:34:49 PDT --- Compiles on 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4822] Problem with std.stdio.File.writef(%c
http://d.puremagic.com/issues/show_bug.cgi?id=4822 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:37:32 PDT --- The program runs fine on 2.059, and the text file is created with 'x' inside. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4803] std.range.chain with const string arguments
http://d.puremagic.com/issues/show_bug.cgi?id=4803 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-04-21 15:39:19 PDT --- (In reply to comment #3) Compiles on 2.059 Thanks for testing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5064] std.algorithm.map, delegates and cast(dchar) = runtime crash
http://d.puremagic.com/issues/show_bug.cgi?id=5064 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #7 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 15:58:29 PDT --- I've noted that the issue is on x86_64, but FYI, on 2.059 Win32 the cases in description and comment 1 run fine (even without -inline), while Don's test cases produce an access violation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5106] makeIndex should return SortedRange
http://d.puremagic.com/issues/show_bug.cgi?id=5106 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5130] writeln cannot take delegate
http://d.puremagic.com/issues/show_bug.cgi?id=5130 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #3 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 16:04:10 PDT --- 2.059: PS E:\DigitalMars\dmd2\samples rdmd bug.d 402020 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4737] typeid doesn't work for scoped enum with initializer
http://d.puremagic.com/issues/show_bug.cgi?id=4737 --- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 16:06:36 PDT --- Oups, didn't see it. I guess it's time to go to bed... :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4737] typeid doesn't work for scoped enum with initializer
http://d.puremagic.com/issues/show_bug.cgi?id=4737 --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-04-21 16:15:22 PDT --- (In reply to comment #4) Oups, didn't see it. I guess it's time to go to bed... :) No worries. I was on a closing closing streak once ages ago and I ended up accidentally closing a bunch of DMD 1.x bugs because I couldn't recreate them in 2.x (I wasn't looking at the Version field above). They all had to be reverted to open again. :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7818] __traits(allMembers) issue?
http://d.puremagic.com/issues/show_bug.cgi?id=7818 Kenji Hara k.hara...@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 7724] 'final:' doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7724 --- Comment #12 from Stewart Gordon s...@iname.com 2012-04-21 16:38:03 PDT --- (In reply to comment #8) I need to reiterate the consistency issue. Other superfluous attributes appear to be silently ignored where they are not applicable. __gshared makes no sense on a function, but it doesn't complain, as is static, shared, immutable, etc. By superfluous, do you mean redundant or not making sense in the context? This is an important distinction to consider. (In reply to comment #10) It's clearly a bug. All other attributes work as expected. Not sure what you mean by that (In reply to comment #11) Seeing as DMD ignores most no-op attributes, I have no idea why this is the one where it suddenly decides that it should generate an error. I think final on variables should just be ignored, in keeping with other attributes. What particular other attributes are you talking about? Thinking about it now, variables can't be overridden, and so essentially are already final. Banning them from being declared final might be considered silly on this basis. So final on member variables is redundant, as opposed to (for example) __gshared on functions which doesn't make sense. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7963] New: dmd doesn't inline std.algorithm.swap on a 'alias this' struct
http://d.puremagic.com/issues/show_bug.cgi?id=7963 Summary: dmd doesn't inline std.algorithm.swap on a 'alias this' struct Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: performance Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-04-21 16:49:12 PDT --- I have seen that dmd doesn't inline swap() when it's used on a simple struct that contains a fixed size array with alias this: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is a version that uses std.algorithm.swap, inlining of swap doesn't happen: import std.algorithm: swap; struct Foo { int[2] xy; alias xy this; } int main() { auto f1 = Foo([1, 2]); auto f2 = Foo([1, 2]); swap(f1, f2); return f1[0]; } __Dmaincomdat L0:subESP,014h movECX,1 movEDX,offset FLAT:_D12TypeInfo_G2i6__initZ pushEBX pushESI pushECX subESP,4 push2 pushEDX callnear ptr __d_arrayliteralTX addESP,0Ch movEBX,EAX popECX mov[EBX],ECX movECX,2 movEAX,[EBX] mov4[EBX],ECX movEDX,4[EBX] mov0Ch[ESP],EAX mov010h[ESP],EDX movEDX,offset FLAT:_D12TypeInfo_G2i6__initZ pushECX pushEDX callnear ptr __d_arrayliteralTX movESI,EAX leaECX,014h[ESP] movdword ptr [EAX],1 movEAX,[ESI] movdword ptr 4[ESI],2 movEDX,4[ESI] mov01Ch[ESP],EAX mov020h[ESP],EDX pushECX leaEAX,020h[ESP] callnear ptr _D3std9algorithm21__T4swapTS5test33FooZ4swapFNaNbNeKS5test33FooKS5test33FooZv addESP,8 movEAX,0Ch[ESP] popESI popEBX addESP,014h ret - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is a version that uses a shorter (and less correct) swapping function, here inlining happens: void swap2(T)(ref T lhs, ref T rhs) pure nothrow { auto tmp = lhs; lhs = rhs; rhs = tmp; } struct Foo { int[2] xy; alias xy this; } int main() { auto f1 = Foo([1, 2]); auto f2 = Foo([1, 2]); swap2(f1, f2); return f1[0]; } __Dmaincomdat L0:pushEAX movECX,offset FLAT:_D12TypeInfo_G2i6__initZ pushEAX movEAX,1 pushEBX pushESI pushEDI pushEAX subESP,4 push2 pushECX callnear ptr __d_arrayliteralTX addESP,0Ch movEDX,EAX popEAX movESI,2 movEDI,offset FLAT:_D12TypeInfo_G2i6__initZ pushESI mov[EDX],EAX mov4[EDX],ESI pushEDI callnear ptr __d_arrayliteralTX movEBX,EAX movdword ptr [EAX],1 movEAX,[EBX] mov4[EBX],ESI movEDX,4[EBX] mov014h[ESP],EAX mov018h[ESP],EDX addESP,8 movEAX,0Ch[ESP] popEDI popESI popEBX addESP,8 ret - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - swap() is a very basic function, it's used all the time in sorts. I have found this performance problem because the missed inlining slows down the sort routine I was using. Test done with dmd 2.060alpha, with -O -release -inline. Note: this problem doesn't happen if alias this is not used: struct Foo2 { int[2] xy; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---