[Issue 8113] alias this and opDispatch() don't forward opCall
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #6 from Kenji Hara k.hara...@gmail.com 2012-05-17 23:04:02 PDT --- (In reply to comment #5) Thanks. Just wondering, why is the second one an 'enhancement'? Isn't opUnary just a member, which should also be opDispatch'ed? Today these forwarding doesn't work at all. struct S { void opDispatch(string op, A...)(A args){} } void main() { S s; +s; // not converted to opDispatch!(opUnary, ...) s + s; // not converted to opDispatch!(opBinary, ...) s();// not converted to opDispatch!(opCall, ...) } So I think this is an enhancement rather than a bug. (I'm figuring that the only members which should not be opDispatch'able are: opDispatch itself, the constructors, and the destructor. Anything else, by definition, is dispatched on the object.) I think no. At least, constructor and destructor have some special features (e.g. can modify const members for construction), but opDispatch doesn't. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7810] ctRegex!`a|b` asserts at regex.d:1150
http://d.puremagic.com/issues/show_bug.cgi?id=7810 --- Comment #5 from Dmitry Olshansky dmitry.o...@gmail.com 2012-05-17 23:01:09 PDT --- (In reply to comment #4) Doesn't appear to require ctRegex to trigger. This produces the same assertion failure. import std.regex; auto r = regex(r(a|c); void main() { } This worked in 2.058 but not 2.059. not the same. And yes, global variable == CTFE parser. + r(a|c unbalanced paren, so it should eventually throw exception but it asserts before it have the chance to do that. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8113] alias this and opDispatch() don't forward opCall
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #7 from wfunct...@hotmail.com 2012-05-18 00:42:50 PDT --- (In reply to comment #6) Today these forwarding doesn't work at all. lol I imagined that was the bug. I guess you could call it the lack of a feature too haha. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
std.conv.to throws exception when converting const string to int with -O optimisation switch
Hi, It seems code compiled by dmd with or without the optimisation switch -O behaves differently in this situation: /* * Compile with either * dmd main.d (won't throw exception) * or * dmd main.d -O (will throw exception) */ import std.conv; void main() { string a = 1; const string b = 10; int Na = to!int(a); // fine int Nb = to!int(b); // throws exception if compiled with -O const int constNb = to!int(b); // throws exception if compiled with -O } A problem only occurs with the optimisation switch (-O), in which case an exception is thrown upon conversion of the const string to int (or uint; perhaps others too?). The exception thrown is: std.conv.ConvException@/usr/local/bin/../include/dmd2/phobos/std/conv.d(1749): Can't convert value `10' of type string to type int 5 main0x000b630e int std.conv.toImpl!(int, const(immutable(char)[])).toImpl(const(immutable(char)[])) + 110 6 main0x000b6239 int std.conv.to!(int).to!(const(immutable(char)[])).to(const(immutable(char)[])) + 17 7 main0x000b5da4 _Dmain + 64 8 main0x000c3ff3 extern (C) int rt.dmain2.main(int, char**).void runMain() + 23 9 main0x000c3b9d extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 29 10 main0x000c4040 extern (C) int rt.dmain2.main(int, char**).void runAll() + 64 11 main0x000c3b9d extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 29 12 main0x000c3b37 main + 179 13 main0x000b5d59 start + 53 14 ??? 0x0001 0x0 + 1 Thanks!
Re: [Issue 3363] std.stream.readf segfaults with immutable format strings
Indeed this issue is still open. I've resorted to doing the following, in order to make obvious (to a future reader of the code) the bug: int charsRead = fin.readf(cast(char []) %c\n, myChar); Maybe a unittest should be included in the appropriate place within stream.d?
[Issue 8114] New: Methods are delegates, not functions.
http://d.puremagic.com/issues/show_bug.cgi?id=8114 Summary: Methods are delegates, not functions. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2012-05-18 11:34:43 PDT --- class Test { public void foo() { } } static assert(is(typeof(Test.foo) == void function())); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8114] Methods are delegates, not functions.
http://d.puremagic.com/issues/show_bug.cgi?id=8114 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added Status|NEW |RESOLVED CC||schvei...@yahoo.com Resolution||INVALID --- Comment #1 from Steven Schveighoffer schvei...@yahoo.com 2012-05-18 12:06:24 PDT --- As horrible as this is, it's intended behavior :) It's the same type you would get if you obtained the funcptr property of a delegate to the same member function. Changing to invalid, if you want to propose a different way to handle it, reopen as an enhancement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8114] Methods are delegates, not functions.
http://d.puremagic.com/issues/show_bug.cgi?id=8114 wfunct...@hotmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Comment #2 from wfunct...@hotmail.com 2012-05-18 13:56:26 PDT --- I understand what you mean, but if that's the case, then the intentional behavior itself is a bug. The *correct* way to achieve what was intended would be to add the 'this' parameter inside the parameter list. Otherwise, it results in buggy code, since the data type of the function doesn't match what it's pointing to. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8115] New: Templated default constructor not called
http://d.puremagic.com/issues/show_bug.cgi?id=8115 Summary: Templated default constructor not called Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2012-05-18 15:28:03 PDT --- struct S { this(A...)(A) { static assert(0, It compiles?!); } } void main() { auto s = S(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8116] New: new Foo().bar() should work
http://d.puremagic.com/issues/show_bug.cgi?id=8116 Summary: new Foo().bar() should work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2012-05-18 16:37:09 PDT --- It works in C#, and it's kinda handy for it to work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8117] New: Cannot initialize struct member without default constructor
http://d.puremagic.com/issues/show_bug.cgi?id=8117 Summary: Cannot initialize struct member without default constructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2012-05-18 17:02:05 PDT --- struct S { @disable this(); this(int) { } } class T { S s = S(1); } void main() { new T(); } Error: default construction is disabled for type T ^ wat? Why is it looking for a default constructor? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8118] Impossible to initialize a member struct without default constructor or assigment
http://d.puremagic.com/issues/show_bug.cgi?id=8118 --- Comment #1 from wfunct...@hotmail.com 2012-05-18 17:05:45 PDT --- Possibly related: http://d.puremagic.com/issues/show_bug.cgi?id=8117 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8117] Cannot initialize struct member without default constructor
http://d.puremagic.com/issues/show_bug.cgi?id=8117 --- Comment #1 from wfunct...@hotmail.com 2012-05-18 17:05:39 PDT --- Possibly related: http://d.puremagic.com/issues/show_bug.cgi?id=8118 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8118] New: Impossible to initialize a member struct without default constructor or assigment
http://d.puremagic.com/issues/show_bug.cgi?id=8118 Summary: Impossible to initialize a member struct without default constructor or assigment Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2012-05-18 17:05:19 PDT --- struct S { @disable this(); this(int) { } @disable void opAssign(typeof(this)); } class Test { S s = void; // I *EXPLICITLY* told it not to be initialized, but... this() { s = S(to!int(1)); } } void main() { new Test(); } Error: function S.opAssign is not callable because it is annotated with @disable Error: default construction is disabled for type Test Structs without default constructors are pretty much impossible to use. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8104] UFCS on forward reference won't compile
http://d.puremagic.com/issues/show_bug.cgi?id=8104 John Belmonte j...@neggie.net changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|nob...@puremagic.com|j...@neggie.net --- Comment #2 from John Belmonte j...@neggie.net 2012-05-18 18:36:34 PDT --- Appears to be a one-line fix. Assuming I can figure out the build and unit test framework I'll prepare a pull request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8071] ICE(glue.c): delegate passed to std.algorithm.map
http://d.puremagic.com/issues/show_bug.cgi?id=8071 kekeni...@yahoo.co.jp changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #2 from kekeni...@yahoo.co.jp 2012-05-18 19:16:49 PDT --- *** This issue has been marked as a duplicate of issue 4481 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4481] ICE(glue.c, !vthis-csym) or compiles, depending on the import statements order
http://d.puremagic.com/issues/show_bug.cgi?id=4481 kekeni...@yahoo.co.jp changed: What|Removed |Added CC||kekeni...@yahoo.co.jp --- Comment #5 from kekeni...@yahoo.co.jp 2012-05-18 19:16:49 PDT --- *** Issue 8071 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 8114] Methods are delegates, not functions.
http://d.puremagic.com/issues/show_bug.cgi?id=8114 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-05-18 20:25:43 PDT --- Why is this 'critical'? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8114] Methods are delegates, not functions.
http://d.puremagic.com/issues/show_bug.cgi?id=8114 wfunct...@hotmail.com changed: What|Removed |Added Severity|critical|normal -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8114] Methods are delegates, not functions.
http://d.puremagic.com/issues/show_bug.cgi?id=8114 --- Comment #4 from wfunct...@hotmail.com 2012-05-18 20:57:40 PDT --- I put it as critical since it seemed looked like a bug in DMD (I'd never seen it before and it didn't make sense), but when people said it was intentional I forgot to change the status after re-opening it. I'll make it normal. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---