[Issue 6279] Regression(2.054 beta): array-vararg with pointer type not working in safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6279 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #1 from yebblies yebbl...@gmail.com 2011-07-10 16:14:15 EST --- https://github.com/D-Programming-Language/dmd/pull/226 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4341] compiling with -unittest on win32 produces invalid executable
http://d.puremagic.com/issues/show_bug.cgi?id=4341 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||WORKSFORME --- Comment #2 from yebblies yebbl...@gmail.com 2011-07-10 16:26:16 EST --- According to the above comment, this has been working since 2.048 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4974] Cannot have pure constructor due to impure invariant
http://d.puremagic.com/issues/show_bug.cgi?id=4974 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||FIXED --- Comment #8 from yebblies yebbl...@gmail.com 2011-07-10 17:31:56 EST --- Now that we have printing from pure functions inside debug conditions, I think this is all solved. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4333] Cannot use tuple of local symbols in constraint nor static if
http://d.puremagic.com/issues/show_bug.cgi?id=4333 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||WORKSFORME --- Comment #2 from yebblies yebbl...@gmail.com 2011-07-10 17:59:19 EST --- These all seem to work on dmd2.054 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4606] access modifier causes failure to find stack pointer for template delegate
http://d.puremagic.com/issues/show_bug.cgi?id=4606 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||rejects-valid CC||yebbl...@gmail.com --- Comment #1 from yebblies yebbl...@gmail.com 2011-07-10 18:06:08 EST --- The problem is that when trying to decide if a struct is nested or not, StructDeclaration::semantic only checks top-level symbols for functions. It should check inside nested symbols as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6278 --- Comment #3 from Michel Fortin michel.for...@michelf.com 2011-07-10 06:28:53 EDT --- A simple fix for this would be to add a flag for compiler-generated catch blocks that'd allow bypassing @safe checks when appropriate. I wonder how it works for scope(failure)... And yes OutOfMemoryError shouldn't be caught by contracts. Adding a new exception type would help, but I think ContractException should be ContractError instead and be a subclass of Error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6278 --- Comment #4 from yebblies yebbl...@gmail.com 2011-07-10 20:47:00 EST --- (In reply to comment #3) A simple fix for this would be to add a flag for compiler-generated catch blocks that'd allow bypassing @safe checks when appropriate. I wonder how it works for scope(failure)... Simple, yes. But is it correct? The whole idea is that Errors can leave the program in an invalid state, so continuing after one in @safe code is not allowed. If there's no chance of leaving the program in an invalid state, why is it an error in the first place? And yes OutOfMemoryError shouldn't be caught by contracts. Adding a new exception type would help, but I think ContractException should be ContractError instead and be a subclass of Error. Why would it be an Error? An in contract failure is allowed, it just means that a different in contract in the hierarchy should be tried instead. The meaning of assert inside in contracts is very different from asserts everywhere else, where they mean they program has reached a state that shouldn't be possible. I think out contracts should throw normal AssertErrors though. I'm starting to think assertions inside in contracts (for virtual functions only) should become special contractAssert()s throwing ContractExceptions. Regardless of the correct fix, is this a blocker for you? It might be worth jamming in a workaround before the release is done if it is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6278 --- Comment #5 from Michel Fortin michel.for...@michelf.com 2011-07-10 07:02:27 EDT --- Simple, yes. But is it correct? It's a fix for the issue at hand. It doesn't fix other issues related to contracts, but it doesn't degrade things either. If you want to fix all the issues in one step though, I'm not stopping you. Why would it be an Error? Because in general contract violations are errors. There's indeed a special case for contracts of overriding functions, but does that justify creating a new error type just for that case? I think it's more consistent if all contracts throw ContractErrors than if some contracts throw ContractExceptions and some other throw AssertErrors. Regardless of the correct fix, is this a blocker for you? It's not a blocker: I made the problematic function @trusted for now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6280] New: [CTFE] Cannot put 'in' expression of AA in an 'if' condition
http://d.puremagic.com/issues/show_bug.cgi?id=6280 Summary: [CTFE] Cannot put 'in' expression of AA in an 'if' condition Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-10 04:16:22 PDT --- Test case: static assert({ if (0 in [0:0]) {} return true; }()); x.d(4): Error: cannot evaluate delegate pure nothrow bool() { if (0 in [0:0]) { } return true; } () at compile time x.d(1): Error: static assert (delegate pure nothrow bool() { if (0 in [0:0]) { } return true; } ()) is not evaluatable at compile time Calling 'if((a in b) !is null)' can workaround the problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6278] Regression(2.054 beta): 'in' contract inheritance doesn't work with safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6278 --- Comment #7 from Michel Fortin michel.for...@michelf.com 2011-07-10 08:21:02 EDT --- Only the overridden contracts would throw ContractExceptions, the only way you would ever see them was if you did: [...] Which is just horrible. But it would be legal, even in safe code. And it'd be inconsistent since it'd work only in overriding contracts and not elsewhere, exposing an implementation detail. (And it has nothing to do with this bug. I think you should fill a bug about other errors being caught by contracts and discuss all this there.) If we disallow scope(exit/failure) and try/catch inside in contracts assert(x) could be re-written to if (!x) goto contractfail; which bypasses exceptions altogether. Wouldn't that lead to other problems? If you had a struct with a destructor as a local variable inside your contract, that destructor will be called in an implicit finally block, much like scope(exit), so disabling try/finally will break that. Beside, what do we gain by disabling this? I agree it'd a poor coding practice to catch exceptions in contracts, but I don't think the language should try to enforce that. It might even be useful if for some reason you need to debug your contract. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6280] [CTFE] Cannot put 'in' expression of AA in an 'if' condition
http://d.puremagic.com/issues/show_bug.cgi?id=6280 --- Comment #1 from kenn...@gmail.com 2011-07-10 06:00:06 PDT --- The problem is there isn't an IndexExp::isBool. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6264] ICE on testing opSlice in static if
http://d.puremagic.com/issues/show_bug.cgi?id=6264 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #2 from yebblies yebbl...@gmail.com 2011-07-11 00:39:18 EST --- https://github.com/D-Programming-Language/dmd/commit/0d100fb86205ff839e50b49625e821cb1052a43b -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6267] Regression(2.054 beta): Can't increment alias this'd struct from ref return
http://d.puremagic.com/issues/show_bug.cgi?id=6267 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #3 from yebblies yebbl...@gmail.com 2011-07-11 00:40:10 EST --- https://github.com/D-Programming-Language/dmd/commit/5f6f697a4287494a6e8ae4f84bd5e7d28a115e1a -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4984] Recursive template constraint results in dmd running out of memory
http://d.puremagic.com/issues/show_bug.cgi?id=4984 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch CC||yebbl...@gmail.com --- Comment #3 from yebblies yebbl...@gmail.com 2011-07-11 04:06:11 EST --- https://github.com/D-Programming-Language/dmd/pull/228 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6281] [CTFE] A null pointer '!is null' returns 'true'.
http://d.puremagic.com/issues/show_bug.cgi?id=6281 kenn...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #1 from kenn...@gmail.com 2011-07-10 11:23:03 PDT --- DMD pull #229. https://github.com/D-Programming-Language/dmd/pull/229 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6266] Mac OSX linker fails to recognize private method of interface
http://d.puremagic.com/issues/show_bug.cgi?id=6266 Blazej Podsiadlo blazej.podsia...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|DUPLICATE | --- Comment #4 from Blazej Podsiadlo blazej.podsia...@gmail.com 2011-07-10 11:49:48 PDT --- Hi, I'm not sure if all private methods should be implicitly final. I've been trying to implement NVI (Non-Virtual Interface) Idiom found in Alexandrescu's book (p213). Could you please make sure about that? Thank you, Blazej -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6266] Mac OSX linker fails to recognize private method of interface
http://d.puremagic.com/issues/show_bug.cgi?id=6266 kenn...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||DUPLICATE --- Comment #5 from kenn...@gmail.com 2011-07-10 11:54:22 PDT --- (In reply to comment #4) Hi, I'm not sure if all private methods should be implicitly final. I've been trying to implement NVI (Non-Virtual Interface) Idiom found in Alexandrescu's book (p213). Could you please make sure about that? Thank you, Blazej Please put the comment to bug 4542. *** This issue has been marked as a duplicate of issue 3581 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6282] New: [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA
http://d.puremagic.com/issues/show_bug.cgi?id=6282 Summary: [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-10 12:26:29 PDT --- Test case: - static assert({ auto a = [4:1]; auto n = *(4 in a); return n; }() == 1); - x.d(3): Error: CTFE internal error: illegal reference value [4:1][4] Assertion failed: (isRefValueValid(newval)), function createRefValue, file interpret.c, line 4978. Abort trap - The ICE also happens when the string 1 is replaced by any reference type (array/aa). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4984] Recursive template constraint results in dmd running out of memory
http://d.puremagic.com/issues/show_bug.cgi?id=4984 --- Comment #4 from Jonathan M Davis jmdavisp...@gmx.com 2011-07-10 12:44:45 PDT --- Wow. A fix for this one? This'll be huge! Anything that causes dmd to use less memory is big - especially if templates are involved. Thanks! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6283] New: [CTFE][Regression 2.054] Failed to assign to AA using a constness-changed array as key
http://d.puremagic.com/issues/show_bug.cgi?id=6283 Summary: [CTFE][Regression 2.054] Failed to assign to AA using a constness-changed array as key Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-10 12:57:54 PDT --- Test case: --- static assert( { immutable qq = qq; string q = qq; // -- from immutable(char[]) to immutable(char)[] int[string] pieces = [a:1]; pieces[q] = 0; // -- can't interpret return true; }() ); --- x.d(9): Error: cannot evaluate delegate pure nothrow bool() { immutable immutable(char[]) qq = qq; string q = qq; int[string] pieces = [a:1]; pieces[q] = 0; return true; } () at compile time x.d(1): Error: static assert (delegate pure nothrow bool() { immutable immutable(char[]) qq = qq; string q = qq; int[string] pieces = [a:1]; pieces[q] = 0; return true; } ()) is not evaluatable at compile time --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6283] [CTFE][Regression 2.054] Failed to assign to AA using a constness-changed array as key
http://d.puremagic.com/issues/show_bug.cgi?id=6283 --- Comment #1 from kenn...@gmail.com 2011-07-10 13:07:57 PDT --- The regression was introduced in commit 08352 in fixing the type-painting bug revealed by bug 4063. https://github.com/D-Programming-Language/dmd/commit/08352 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6277] Disallow short floating point literals
http://d.puremagic.com/issues/show_bug.cgi?id=6277 --- Comment #3 from bearophile_h...@eml.cc 2011-07-10 13:17:38 PDT --- The proposal is for hex floating point literals too. Daniel Murphy suggests to disallow 1._3 too, to help UFCS (Numeric literals cannot *start* with an underscore already). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6284] New: [Regression 2.054] 'pure' does not work with 'with' statement
http://d.puremagic.com/issues/show_bug.cgi?id=6284 Summary: [Regression 2.054] 'pure' does not work with 'with' statement Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-10 13:23:23 PDT --- Test case - struct S { int a; } pure void bug6284() { S s; auto b = s.a; // ok with (s) { auto c = a; // error } } - x.d(8): Error: pure nested function 'bug6284' cannot access mutable data 'a' - The error does not happen in 2.053, probably due to the stricter pure check in 2.054. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6284] [Regression 2.054] 'pure' does not work with 'with' statement
http://d.puremagic.com/issues/show_bug.cgi?id=6284 --- Comment #1 from kenn...@gmail.com 2011-07-10 13:30:33 PDT --- (and yes, the regression is indeed introduced in commit 84b4f tighten purity checks. https://github.com/D-Programming-Language/dmd/commit/84b4f) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6285] New: switch-case statement fails for enums of strings
http://d.puremagic.com/issues/show_bug.cgi?id=6285 Summary: switch-case statement fails for enums of strings Product: D Version: D2 Platform: x86_64 OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: blazej.podsia...@gmail.com --- Comment #0 from Blazej Podsiadlo blazej.podsia...@gmail.com 2011-07-10 13:59:13 PDT --- Hi, Switch-case statement fails for enums of strings because it is not of integral type. For the following code: enum strEnum : string {strA = strA, strB = strB}; strEnum se = strEnum.strA; switch (strEnum) { case strEnum.strA: break; }; I get the error message: Error: 'strEnum' is not of integral type, it is a strEnum In the same moment, I can workaround that by: string realStr = strEnum.strA; switch (realStr) { case strEnum.strA: break; }; Unfortunately it doesn't help in my case where I want use final switch: final switch (strEnum) { case strEnum.strA: break; case strEnum.strB: break; }; Best Regards Blazej -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6285] switch-case statement fails for enums of strings
http://d.puremagic.com/issues/show_bug.cgi?id=6285 kenn...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||kenn...@gmail.com Resolution||DUPLICATE --- Comment #1 from kenn...@gmail.com 2011-07-10 14:18:36 PDT --- *** This issue has been marked as a duplicate of issue 2950 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2950] Switch for enum : string fails
http://d.puremagic.com/issues/show_bug.cgi?id=2950 kenn...@gmail.com changed: What|Removed |Added CC||blazej.podsia...@gmail.com --- Comment #2 from kenn...@gmail.com 2011-07-10 14:18:36 PDT --- *** Issue 6285 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: ---