[Issue 7218] Nested function with contract is rejected
http://d.puremagic.com/issues/show_bug.cgi?id=7218 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-05 00:51:29 PST --- https://github.com/D-Programming-Language/dmd/commit/4d93bbf53cba3eb19733d2e5cd209b67034f2d10 https://github.com/D-Programming-Language/dmd/commit/7a4392865598377da2d197edf48a88bb46bd2ed4 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7230] New: Crash during printing anonymous union with writeln family functions.
http://d.puremagic.com/issues/show_bug.cgi?id=7230 Summary: Crash during printing anonymous union with writeln family functions. Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: luk.wrzo...@gmail.com --- Comment #0 from Lukasz Wrzosek luk.wrzo...@gmail.com 2012-01-05 02:28:54 PST --- writeln is not aware of anonymous unions inside of structs (probably classes too). The attached file crashes when run. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7230] Crash during printing anonymous union with writeln family functions.
http://d.puremagic.com/issues/show_bug.cgi?id=7230 --- Comment #1 from Lukasz Wrzosek luk.wrzo...@gmail.com 2012-01-05 02:30:33 PST --- Created an attachment (id=1068) bug test case -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7230] Crash during printing anonymous union with writeln family functions.
http://d.puremagic.com/issues/show_bug.cgi?id=7230 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #2 from bearophile_h...@eml.cc 2012-01-05 02:38:21 PST --- Code copied here to increase its visibility: import std.stdio; struct Bug7230 { union { string a; int b; } } void main() { Bug7230 bug; bug.b = 123; writeln(bug); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7231] New: Segfault using opDispatch with property notation
http://d.puremagic.com/issues/show_bug.cgi?id=7231 Summary: Segfault using opDispatch with property notation Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rob...@octarineparrot.com --- Comment #0 from Robert Clipsham rob...@octarineparrot.com 2012-01-05 13:52:06 GMT --- The following testcase segfaults with dmd 2.057: struct Contract { @property void opDispatch(string name, T)(T value) { } } void validate() { Contract title; title.maxLength(255); // Works title.maxLength = 255; // Segfault } When compiled with dmd -c test.d, tested on OS X 64 and Ubuntu 32. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7232] New: Warning: statement is not reachable has no line number
http://d.puremagic.com/issues/show_bug.cgi?id=7232 Summary: Warning: statement is not reachable has no line number Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rob...@octarineparrot.com --- Comment #0 from Robert Clipsham rob...@octarineparrot.com 2012-01-05 15:52:33 GMT --- When the following is compiled with -w or -wi, it will give a warning without a line number bool addArticle() { scope(failure) return false; return true; } Tested on dmd 2.057 on OS X 64 and Ubuntu 32. $ dmd -w test.d Warning: statement is not reachable -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7233] New: [ICE] (symbol.c 1032) Struct tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7233 Summary: [ICE] (symbol.c 1032) Struct tupleof Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-01-05 09:39:18 PST --- struct Foo { int x, y; } Foo[] front(Foo[][] a) { return a[0]; } void main() { Foo[][] b; auto xy = b.front[0].tupleof; } DMD 2.058head dmd -inline test.d Internal error: backend\symbol.c 1032 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7234] New: Segmentation fault when using stdio
http://d.puremagic.com/issues/show_bug.cgi?id=7234 Summary: Segmentation fault when using stdio Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rob...@octarineparrot.com --- Comment #0 from Robert Clipsham rob...@octarineparrot.com 2012-01-05 19:46:11 GMT --- The following test case is invalid code, but it is reproducible using valid code (DustMite caused some issues here while narrowing down phobos). It segfaults with dmd 2.057 on both Ubuntu 32 and OS X 64. I've included a comment for how to get a valid code test case, it depends on phobos though! template isInputRange(R) { enum bool isInputRange = is(typeof({ R r; if (r.empty) {} })); } void formattedWrite(Writer, Char, A...)(Writer w, in Char, A args) { foreach (i, arg; args) i= formatGeneric!(Writer, typeof(arg), Char); } struct FormatSpec(Char) {} void formatValue(Writer, T, Char)(Writer w, T val, ref FormatSpec!Char f) if (!isInputRange!T) { } private void formatGeneric(Writer, D, Char)(Writer w, const(void)* arg, ref FormatSpec!Char f) { formatValue(w, *cast(D*) arg, f); } struct File { void writefln(S...)(S args) { auto w = LockingTextWriter(); formattedWrite(w, args); } struct LockingTextWriter {} } File stdout; // You can replace the above with import std.stdio; and // give the opDispatch below a valid signature to gain a // valid code test case, it's rather large though! struct Contract { void opDispatch()(){} } Contract*mOptional; void populate() { stdout.writefln(opt : %s, mOptional); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6205] Strongly-pure nothrow functions with ignored return value are entirely stripped even if it contains a failing 'assert'.
http://d.puremagic.com/issues/show_bug.cgi?id=6205 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #6 from Walter Bright bugzi...@digitalmars.com 2012-01-05 12:34:26 PST --- https://github.com/D-Programming-Language/dmd/commit/ead4a879100a43e44b0321f3d31341fd43b6aab7 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7073] Parsing of class-returning varargs function inside module ctor fails
http://d.puremagic.com/issues/show_bug.cgi?id=7073 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-05 12:33:12 PST --- https://github.com/D-Programming-Language/dmd/commit/74520a3de533c12f484ee1e8329f492beaa3fba4 https://github.com/D-Programming-Language/dmd/commit/9524e90d3640ab1467b1e2534bb1a2e5f152f627 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1827] Uniform syntax for is(), static if, alias, template definition static assert
http://d.puremagic.com/issues/show_bug.cgi?id=1827 --- Comment #7 from Trass3r mrmoc...@gmx.de 2012-01-05 14:01:49 PST --- (In reply to comment #5) The nastiest hack that I see is template MyTemplate(T:T) Hands up everyone who knows what that means, and in what way (T:T) is different from (T)? If you don't know, can you guess? Well, the answer is that (T) will match int, const(int) and invariant(int), but in all three cases, T will be int. Whereas, (T:T) will match the same three things, but now T will be int, const(int) and invariant(int) respectively. At least that's not true anymore. template Bla(T:T) { pragma(msg, T); } template Blub(T) { pragma(msg, T); } alias Bla!(int) A; alias Bla!(const int) B; alias Bla!(immutable int) C; alias Blub!(int) D; alias Blub!(const int) E; alias Blub!(immutable int) F; $ dmd -c test7.d int const(int) immutable(int) int const(int) immutable(int) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7235] New: throwing away return value of pure function should yield an error
http://d.puremagic.com/issues/show_bug.cgi?id=7235 Summary: throwing away return value of pure function should yield an error Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid, diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: mrmoc...@gmx.de --- Comment #0 from Trass3r mrmoc...@gmx.de 2012-01-05 14:15:03 PST --- pure int foo() {return 1;} void main() { foo(); } Doesn't make any sense to me. closely related to http://d.puremagic.com/issues/show_bug.cgi?id=3572 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3572] declaring pure function with void return type should be compile time error
http://d.puremagic.com/issues/show_bug.cgi?id=3572 Trass3r mrmoc...@gmx.de changed: What|Removed |Added Keywords||accepts-invalid, diagnostic CC||mrmoc...@gmx.de Platform|x86 |All OS/Version|Windows |All Severity|enhancement |normal --- Comment #5 from Trass3r mrmoc...@gmx.de 2012-01-05 14:19:40 PST --- Also you shouldn't be able to throw away the result of a pure function. http://d.puremagic.com/issues/show_bug.cgi?id=7235 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3922] Refuse returning nonvoid from void functions
http://d.puremagic.com/issues/show_bug.cgi?id=3922 Trass3r mrmoc...@gmx.de changed: What|Removed |Added Keywords||accepts-invalid CC||mrmoc...@gmx.de Severity|enhancement |normal --- Comment #8 from Trass3r mrmoc...@gmx.de 2012-01-05 14:29:46 PST --- I totally agree, just like others: http://d.puremagic.com/issues/show_bug.cgi?id=3746#c12 This has to happen. Let's consider this a bug and not an enhancements. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6528] Private module functions optimizations
http://d.puremagic.com/issues/show_bug.cgi?id=6528 Trass3r mrmoc...@gmx.de changed: What|Removed |Added Keywords||diagnostic, performance CC||mrmoc...@gmx.de --- Comment #2 from Trass3r mrmoc...@gmx.de 2012-01-05 14:33:18 PST --- Also there should be a warning if you define a private function and not use it (including CTFE). Just like in C. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7235] throwing away return value of pure function should yield an error
http://d.puremagic.com/issues/show_bug.cgi?id=7235 Trass3r mrmoc...@gmx.de changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Trass3r mrmoc...@gmx.de 2012-01-05 14:38:57 PST --- *** This issue has been marked as a duplicate of issue 3882 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3882] Unused result of pure functions
http://d.puremagic.com/issues/show_bug.cgi?id=3882 Trass3r mrmoc...@gmx.de changed: What|Removed |Added CC||mrmoc...@gmx.de --- Comment #8 from Trass3r mrmoc...@gmx.de 2012-01-05 14:38:57 PST --- *** Issue 7235 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 3882] Unused result of pure functions
http://d.puremagic.com/issues/show_bug.cgi?id=3882 Trass3r mrmoc...@gmx.de changed: What|Removed |Added Resolution|WONTFIX |LATER -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7236] New: Protected class members in different file inaccessible
http://d.puremagic.com/issues/show_bug.cgi?id=7236 Summary: Protected class members in different file inaccessible Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: full.de...@gmail.com --- Comment #0 from Taco full.de...@gmail.com 2012-01-05 14:50:24 PST --- Example: a.d: class A { protected: void f() { } } main.d: import a; class B: A { public: void g(A a) // using g(B b) it works { a.f(); // error } } int main() { auto b = new B; b.g(b); } dmd main.d a.d Error: class a.A member f is not accessible This is ONLY if A is in a different file (else B can access any of A its members due to module accessibility). If g accepts B instead of A it works though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7212] Regression(Head): ICE with overload resolution and delegate/function inference
http://d.puremagic.com/issues/show_bug.cgi?id=7212 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-05 14:52:18 PST --- https://github.com/D-Programming-Language/dmd/commit/34bdd686d1cf949bf72dc46520da07d5ce6e06ed -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7237] New: un.di is missing in dmd.2.057.zip
http://d.puremagic.com/issues/show_bug.cgi?id=7237 Summary: un.di is missing in dmd.2.057.zip Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: chr...@mta-international.net --- Comment #0 from chr...@mta-international.net 2012-01-05 15:16:05 PST --- dmd2/src/druntime/import/core/sys/posix/sys/un.di is missing in dmd.2.057.zip downloaded form here: (https://github.com/downloads/D-Programming-Language/dmd/dmd.2.057.zip). But it's corresponding *.d file seems to be present dmd2/src/druntime/src/core/sys/posix/sys/un.d. The problem occurs when Jordi uses the zip file as a base for *.deb packages and ONLY includes the *.di files. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3922] Refuse returning nonvoid from void functions
http://d.puremagic.com/issues/show_bug.cgi?id=3922 --- Comment #9 from bearophile_h...@eml.cc 2012-01-05 15:36:21 PST --- The main real problem (returning a non void from a void function) is now fixed: https://github.com/D-Programming-Language/dmd/commit/c942d51c8b1103d5ce4c3dfc03ae77c07c687cd6 - DMD 2.058head accepts code like this: void foo() { return; } void main() { return foo(); } This code is formally correct, because no real value is ignored. I don't like such code a lot because that code looks like the intent of the programmer is to return something, while this is not true. Maybe allowing this is useful for generic code, I don't know. I'd like to see examples of this usefulness in real code. (But this discussion looks a bit different from the main issue that is now fixed, so maybe this should be moved to a new different Bugzilla issue). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7238] New: Windows installer doesn't install dmd 2.057
http://d.puremagic.com/issues/show_bug.cgi?id=7238 Summary: Windows installer doesn't install dmd 2.057 Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: installer AssignedTo: nob...@puremagic.com ReportedBy: f-moro...@ya.ru --- Comment #0 from f-morozov f-moro...@ya.ru 2012-01-05 16:10:42 PST --- Overview: The installer fails to download dmd.2.057.zip and doesn't notify the user. Steps to Reproduce: Uninstall dmd and try to reinstall it using Windows installer from this page: http://d-programming-language.org/download.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---