[Issue 1243] (D1 only) inout args can point to null
http://d.puremagic.com/issues/show_bug.cgi?id=1243 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added CC||verylonglogin@gmail.com Platform|x86 |All Version|1.014 |D1 Summary|inout args can point to |(D1 only) inout args can |null|point to null OS/Version|Windows |All --- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2013-02-17 11:08:56 MSK --- This is D1 only. For D2 see Issue 7629. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9525] New: [CTFE] Cannot convert S to const(S*) at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=9525 Summary: [CTFE] Cannot convert S to const(S*) at compile time Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: CTFE, rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2013-02-17 13:02:02 MSK --- This code used to work in 2.061: --- void f(T)(in T*) { } void main() { void test(alias a)() { static struct S { } S s; a(s); // Error: Cannot convert S to const(S*) at compile time } static assert((test!f(), true)); } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9519] constant bug in structures
http://d.puremagic.com/issues/show_bug.cgi?id=9519 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #4 from Kenji Hara k.hara...@gmail.com 2013-02-17 02:08:21 PST --- *** This issue has been marked as a duplicate of issue 8741 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8741] wrong code for struct member initialized using struct constructor
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||magnus_lindb...@live.se --- Comment #5 from Kenji Hara k.hara...@gmail.com 2013-02-17 02:08:21 PST --- *** Issue 9519 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 9526] New: ICE when compiling project with unittests
http://d.puremagic.com/issues/show_bug.cgi?id=9526 Summary: ICE when compiling project with unittests Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2013-02-17 13:15:44 MSK --- Another unreducable regression: dmd fails to compile this project with unittest enabled as an unhandled exception (on Windwos) is thrown in its entrails: https://github.com/denis-sh/phobos-additions To be precise, this is the project commit on which dmd fails this way: df789da96db5c707dca27b81b285ea8861a0fb98 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9526] ICE when compiling project with unittests
http://d.puremagic.com/issues/show_bug.cgi?id=9526 --- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2013-02-17 13:17:48 MSK --- And yes, this project used to compile in 2.061. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9096] comsub bug with chained function calls, optimization and attributes
http://d.puremagic.com/issues/show_bug.cgi?id=9096 --- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-02-17 02:20:25 PST --- Same problem occurs in Windows7 (64bit) platform with git head (b729055). output: DMD v2.062 DEBUG el:0035139C cnt=2 cs=255 var TY* foo Internal error: backend\cgcod.c 2188 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9525] [CTFE] Cannot convert S to const(S*) at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=9525 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-02-17 03:27:46 PST --- This bug is introduced by fixing bug 8504. Revision: 6344a72ac2e2e597110891f7aed4b998d58f61fd Author: Martin Nowak Date: 2013年1月23日 2:29:57 Message: Merge pull request #1096 from 9rnsr/fix8504 Issue 8504 - Template attribute inferrence doesn't work By fixing issue 8504, template attribute inference affects mangled name for instantiated function. On the other hand, the function local struct S should have independent mangled name from the inference, but it had accidentally affected. Finally, internal type equality check had wrongly failed. From the implementation detail, the bug mechanism is very similar with bug 8847. Both are caused by unintended mangled name changing. https://github.com/D-Programming-Language/dmd/pull/1669 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9526] ICE when compiling project with unittests
http://d.puremagic.com/issues/show_bug.cgi?id=9526 --- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-02-17 03:33:04 PST --- Is this a dup of bug9525? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9500] Interfaces - shared static this
http://d.puremagic.com/issues/show_bug.cgi?id=9500 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #4 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-17 04:33:27 PST --- Dmd 2.062 beta, linux, git head. No segfault for original code, but valgrind still complains. Removing shared from module constructor makes error explicit and passing array explicitly fixes program. I guess something is wrong with vararg function here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9485] associative array inside struct: intermodule visibility problem
http://d.puremagic.com/issues/show_bug.cgi?id=9485 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-02-17 04:57:09 PST --- *** This issue has been marked as a duplicate of issue 8997 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8997] template instances omit symbol that may be used in other modules
http://d.puremagic.com/issues/show_bug.cgi?id=8997 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||atank...@gmail.com --- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-02-17 04:57:09 PST --- *** Issue 9485 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 6744] Missing AA symbol with enum
http://d.puremagic.com/issues/show_bug.cgi?id=6744 --- Comment #8 from Kenji Hara k.hara...@gmail.com 2013-02-17 05:37:30 PST --- (In reply to comment #0) test.d import traits; void formatValue()() { string[char] aa; aa.length; } void main() { formatValue(); } traits.d enum LOOKUP_LINKAGE = [ 'F': D, 'U': C, 'W': Windows, 'V': Pascal, 'R': C++ ]; Now, the case in comment #0 is a dup of bug 8997, but more general case in comment #1 isn't. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6744] Missing AA symbol with enum
http://d.puremagic.com/issues/show_bug.cgi?id=6744 --- Comment #9 from Kenji Hara k.hara...@gmail.com 2013-02-17 05:44:04 PST --- (In reply to comment #8) Now, the case in comment #0 is a dup of bug 8997, but more general case in comment #1 isn't. s/comment #1/comment #2/ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8898] false positive dangling else warning
http://d.puremagic.com/issues/show_bug.cgi?id=8898 --- Comment #5 from github-bugzi...@puremagic.com 2013-02-17 06:42:46 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8cc8a41836ae504e587f6a952b1c1cbb5a2245a3 fix Issue 8898 - false positive dangling else warning https://github.com/D-Programming-Language/dmd/commit/28e6cc14374a10be122346b0f3332cea57076234 Merge pull request #1668 from 9rnsr/fix8898 fix Issue 8898 - false positive dangling else warning -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9500] Interfaces - shared static this
http://d.puremagic.com/issues/show_bug.cgi?id=9500 --- Comment #5 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-17 07:25:43 PST --- import core.stdc.stdio : printf; interface IFace { void log(); } class Multi : IFace { IFace[] faces; this(IFace[] faces...) { this.faces = faces; print(this); } override void log() { print(m); foreach(face; faces) { if(face !is null) { face.log(); } } } } class Bla : IFace { override void log() {} } Multi m; void print(Multi m) { printf(m=%p\n, cast(void*)m); printf(\tm.faces=%p\n, cast(void*)m.faces); printf(\t\tm.faces[0]=%p\n, cast(void*) m.faces[0]); } static this() { m = new Multi(new Bla()); print(m); } void main() { print(m); m.log(); } Example of output: m=0x7fe9f4b2ffc0 m.faces=0x7fff9ca7c070 m.faces[0]=0x7fe9f4b30ff0 m=0x7fe9f4b2ffc0 m.faces=0x7fff9ca7c070 m.faces[0]=0x7fe9f4b30ff0 m=0x7fe9f4b2ffc0 m.faces=0x7fff9ca7c070 m.faces[0]=0x7fff9ca7c290 m=0x7fe9f4b2ffc0 m.faces=0x7fff9ca7c070 m.faces[0]=0x7fff9ca7c290 Depending on compiler switches and whether shared is appended to module ctor, output of third m.faces[0] (in main) can vary. The fourth m.faces[0] may decay to function pointer, first two would be correct and same. Addresses of higher positions are equal in any case. I guess the problem is that array of Ifaces is not allocated when constructed, hence its content varies thought runtime. I also guess that variardic function should not save its array of arguments in general case. This explains way passing actual array fixed program (because it was properly allocated) and why playing around with module ctor didn't help. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9527] New: Escaping references to variardic parameter array are not properly checked
http://d.puremagic.com/issues/show_bug.cgi?id=9527 Summary: Escaping references to variardic parameter array are not properly checked Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: ma...@maxim-fomin.ru --- Comment #0 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-17 07:44:54 PST --- import std.stdio; class A { int[] array; this(int[] array...) { this.array = array; } } A a; int[] foo(int[] array ...) { //return array; //Error: escaping reference to variadic parameter array a.array = array; return a.array; } int[] bar() { return foo(1,2,3); } void main() { A a = new A(2,3); } This should issue two errors: in A ctor and in foo(); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9500] Interfaces - shared static this
http://d.puremagic.com/issues/show_bug.cgi?id=9500 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #6 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-17 07:46:39 PST --- See issue 9527 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8898] false positive dangling else warning
http://d.puremagic.com/issues/show_bug.cgi?id=8898 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 9526] ICE when compiling project with unittests
http://d.puremagic.com/issues/show_bug.cgi?id=9526 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #4 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-17 09:16:50 PST --- That's because in func.c void markAsNeedingClosure() doesn't check data when loops though the list. Can you test this commit https://github.com/mxfm/dmd/commit/f04bba02261b59a033495cf090711bf0a08dd64e ? I compiled your code on linux with command: dmd unstd/array.d unstd/lifetime.d unstd/generictuple.d unstd/math.d unstd/multidimensionalarray.d unstd/templates.d unstd/traits.d unstd/typecons.d unittest.d -unittest -version=unittestBuild Commit at least fixes segmentation fault for my D environment. Judging by visual D project files, you are compiling on windows and I cannot test dmd on windows. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9526] ICE when compiling project with unittests
http://d.puremagic.com/issues/show_bug.cgi?id=9526 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added Keywords||pull --- Comment #5 from Maxim Fomin ma...@maxim-fomin.ru 2013-02-17 10:31:15 PST --- https://github.com/D-Programming-Language/dmd/pull/1671 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9525] [CTFE] Cannot convert S to const(S*) at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=9525 --- Comment #2 from github-bugzi...@puremagic.com 2013-02-17 11:34:09 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f299278adc40385730ed842664b71d92662e76dc fix Issue 9525 - [CTFE] Cannot convert S to const(S*) at compile time https://github.com/D-Programming-Language/dmd/commit/2a541e0bcfd7491c721a8d11df5556dd4860 Merge pull request #1669 from 9rnsr/fix9525 [Regression 2.062alpha] Issue 9525 - [CTFE] Cannot convert S to const(S*) at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9525] [CTFE] Cannot convert S to const(S*) at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=9525 --- Comment #3 from github-bugzi...@puremagic.com 2013-02-17 11:36:00 PST --- Commit pushed to staging at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0ac44a7c31ce4b426bea608bd3679277b98ae4a7 Merge pull request #1669 from 9rnsr/fix9525 [Regression 2.062alpha] Issue 9525 - [CTFE] Cannot convert S to const(S*) at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull, rejects-valid CC||andrej.mitrov...@gmail.com AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 13:47:59 PST --- https://github.com/D-Programming-Language/dmd/pull/1673 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9527] Escaping references to variardic parameter array are not properly checked
http://d.puremagic.com/issues/show_bug.cgi?id=9527 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #1 from bearophile_h...@eml.cc 2013-02-17 14:23:42 PST --- See also Issue 5212 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5515] std.conv.to for safer enum casts
http://d.puremagic.com/issues/show_bug.cgi?id=5515 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution||DUPLICATE --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 15:05:24 PST --- Implemented in Issue8143. *** This issue has been marked as a duplicate of issue 8143 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8143] Safe std.conv.to enum conversion
http://d.puremagic.com/issues/show_bug.cgi?id=8143 --- Comment #25 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 15:05:24 PST --- *** Issue 5515 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 5515] std.conv.to for safer enum casts
http://d.puremagic.com/issues/show_bug.cgi?id=5515 --- Comment #3 from bearophile_h...@eml.cc 2013-02-17 16:04:00 PST --- (In reply to comment #2) Implemented in Issue8143. *** This issue has been marked as a duplicate of issue 8143 *** Given that Enums with floating-point or string base types are not supported. this is more a WONTFIX :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5515] std.conv.to for safer enum casts
http://d.puremagic.com/issues/show_bug.cgi?id=5515 --- Comment #4 from bearophile_h...@eml.cc 2013-02-17 16:33:03 PST --- But probably this should be supported: import std.conv: to; enum Foo : char { A = 'a' } void main() { dchar d = 'a'; Foo f = to!Foo(d); } Currently it gives: ...\dmd2\src\phobos\std\conv.d(274): Error: template std.conv.toImpl does not match any function template declaration. Candidates are: ... It's useful when you want to write (the argument of this map is a dchar): import std.conv: to; import std.algorithm: map; enum Foo : char { A='a', B='b', C='c' } void main() { auto foos = abcabcabc.map!(to!Foo)(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5515] std.conv.to for safer enum casts
http://d.puremagic.com/issues/show_bug.cgi?id=5515 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|DUPLICATE | --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 16:46:53 PST --- (In reply to comment #4) But probably this should be supported: import std.conv: to; enum Foo : char { A = 'a' } void main() { dchar d = 'a'; Foo f = to!Foo(d); } Ok. Reopening issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4124] toString() for BitArray and more
http://d.puremagic.com/issues/show_bug.cgi?id=4124 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 17:03:02 PST --- It would help if you didn't make multiple feature requests in a single entry. As for toString (the name of the report), I've implemented it here: https://github.com/D-Programming-Language/phobos/pull/1144 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4124] toString() for BitArray and more
http://d.puremagic.com/issues/show_bug.cgi?id=4124 --- Comment #5 from bearophile_h...@eml.cc 2013-02-17 17:24:18 PST --- (In reply to comment #4) It would help if you didn't make multiple feature requests in a single entry. When I am asking things like this for a single struct of Phobos: - reset all bits - set all bits Is it right to create two different enhancement requests for those two things? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4124] toString() for BitArray and more
http://d.puremagic.com/issues/show_bug.cgi?id=4124 --- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 17:28:06 PST --- (In reply to comment #5) (In reply to comment #4) It would help if you didn't make multiple feature requests in a single entry. When I am asking things like this for a single struct of Phobos: - reset all bits - set all bits Is it right to create two different enhancement requests for those two things? One would be enough since they're highly related. toString is largely unrelated to this though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 952] Strange Error: prefix on some warning messages
http://d.puremagic.com/issues/show_bug.cgi?id=952 Stewart Gordon s...@iname.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #2 from Stewart Gordon s...@iname.com 2013-02-17 17:29:31 PST --- This bug is about warning messages _generally_, not just this particular one. And a new instance has cropped up: - switch_fallthrough_b.d - void main() { char c = 'x'; switch(c) { case 'U', 'u' : c = 'q'; case 'L', 'l' : c = 'r'; // code . . . default: } } -- C:\Users\Stewart\Documents\Programming\D\Testsdmd switch_fallthrough_b.d C:\Users\Stewart\Documents\Programming\D\Testsdmd -w switch_fallthrough_b.d switch_fallthrough_b.d(6): Error: switch case fallthrough - use 'goto case;' if intended switch_fallthrough_b.d(9): Error: switch case fallthrough - use 'goto default;' if intended -- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 952] Strange Error: prefix on some warning messages
http://d.puremagic.com/issues/show_bug.cgi?id=952 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 17:33:13 PST --- (In reply to comment #2) And a new instance has cropped up: This will be resolved with pull for Issue 6552. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 Stewart Gordon s...@iname.com changed: What|Removed |Added Keywords|pull, rejects-valid |accepts-invalid, ||diagnostic, spec CC||s...@iname.com --- Comment #5 from Stewart Gordon s...@iname.com 2013-02-17 17:33:51 PST --- The code is not valid per the current spec. http://dlang.org/statement.html#SwitchStatement CaseStatement: case ArgumentList : ScopeStatementList ScopeStatementList: StatementListNoCaseNoDefault StatementListNoCaseNoDefault: StatementNoCaseNoDefault StatementNoCaseNoDefault StatementListNoCaseNoDefault By this spec, case 1,2: case 3,4: anything is invalid. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9528] New: std.array.appender can't append elements with const members
http://d.puremagic.com/issues/show_bug.cgi?id=9528 Summary: std.array.appender can't append elements with const members Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: hst...@quickfur.ath.cx --- Comment #0 from hst...@quickfur.ath.cx 2013-02-17 17:37:08 PST --- Code: -- import std.array; E[] fastCopy(E)(E[] src) { auto app = appender!(const(E)[])(); foreach (i, e; src) app.put(e); return app.data; } E[] slowCopy(E)(E[] src) { E[] result; foreach (i, e; src) result ~= e; return result; } void main() { class C {} struct S { const(C) c; } S[] s = [ S(new C) ]; //auto t = fastCopy(s); // Does not compile auto t = slowCopy(s); } -- If fastCopy is used in place of slowCopy, dmd git head gives: -- /usr/src/d/phobos/std/array.d(2256): Error: cannot modify struct (cast(S*)(*this._data).arr)[len] S with immutable members test.d(6): Error: template instance std.array.Appender!(const(S)[]).Appender.put!(S) error instantiating test.d(22):instantiated from here: fastCopy!(S) test.d(7): Error: cannot implicitly convert expression (app.data()) of type const(S)[] to S[] test.d(22): Error: template instance test.fastCopy!(S) error instantiating -- Is there any workaround for this? What I'm trying to accomplish is to copy an array of elements with const fields, but selectively skip elements based on some predicate (so straight .dup is out of the question). But using =~ is slow because of continual resizing/reallocation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords|accepts-invalid,|pull, rejects-valid |diagnostic, spec| --- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 17:43:36 PST --- (In reply to comment #5) The code is not valid per the current spec. http://dlang.org/statement.html#SwitchStatement CaseStatement: case ArgumentList : ScopeStatementList ScopeStatementList: StatementListNoCaseNoDefault StatementListNoCaseNoDefault: StatementNoCaseNoDefault StatementNoCaseNoDefault StatementListNoCaseNoDefault By this spec, case 1,2: case 3,4: anything is invalid. I already said the spec was wrong and will have to be fixed. The OP code works without -w, and we're not about to break a ton of code because the spec is outdated (which is *very* common). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 --- Comment #7 from Stewart Gordon s...@iname.com 2013-02-17 18:07:37 PST --- Where is the separate bug report about the spec being wrong? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9529] New: Switch Statement grammar bug for the chain of case statements
http://d.puremagic.com/issues/show_bug.cgi?id=9529 Summary: Switch Statement grammar bug for the chain of case statements Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid, spec Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2013-02-17 18:28:51 PST --- Currently the chain of case statement is not allowed in grammar. void main() { int c; switch (c) { case 1: case 2: // chain break; default: break; } } But it is no sense. Because it is just equivalent with: switch (c) { case 1 : .. case 2: break; http://dlang.org/statement.html#SwitchStatement SwitchStatement: switch ( Expression ) ScopeStatement CaseStatement: case ArgumentList : ScopeStatementList CaseRangeStatement: case FirstExp : .. case LastExp : ScopeStatementList FirstExp: AssignExpression LastExp: AssignExpression DefaultStatement: default : ScopeStatementList ScopeStatementList: StatementListNoCaseNoDefault StatementListNoCaseNoDefault: StatementNoCaseNoDefault StatementNoCaseNoDefault StatementListNoCaseNoDefault StatementNoCaseNoDefault: ; NonEmptyStatementNoCaseNoDefault ScopeBlockStatement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 --- Comment #8 from Kenji Hara k.hara...@gmail.com 2013-02-17 18:29:26 PST --- (In reply to comment #7) Where is the separate bug report about the spec being wrong? Opened. Issue 9529 - Switch Statement grammar bug for the chain of case statements -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1369] Unable to find 'this' in __traits(getMember)
http://d.puremagic.com/issues/show_bug.cgi?id=1369 --- Comment #4 from github-bugzi...@puremagic.com 2013-02-17 18:47:38 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/38bacc17f25b32f41411cb5a1e6b087431073779 fix Issue 1369 - getMember doesn't work for variables in aggregates https://github.com/D-Programming-Language/dmd/commit/6925db01b364e5e053066bf48f73d2b2e7e11632 Merge pull request #1530 from 9rnsr/fix1369 Issue 1369 - getMember doesn't work for variables in aggregates -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1369] Unable to find 'this' in __traits(getMember)
http://d.puremagic.com/issues/show_bug.cgi?id=1369 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 3745] Linking error with associative array of arrays
http://d.puremagic.com/issues/show_bug.cgi?id=3745 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-02-17 19:28:18 PST --- *** This issue has been marked as a duplicate of issue 8997 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8997] template instances omit symbol that may be used in other modules
http://d.puremagic.com/issues/show_bug.cgi?id=8997 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||aifg...@gmail.com --- Comment #4 from Kenji Hara k.hara...@gmail.com 2013-02-17 19:28:18 PST --- *** Issue 3745 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 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 --- Comment #9 from github-bugzi...@puremagic.com 2013-02-17 19:34:01 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cac04a3dd38741205cac6b61400a7f91a8c8a36a Fixes Issue 6552 - Invalid error on non-existent switch-case fallthrough. https://github.com/D-Programming-Language/dmd/commit/631e980d134d7217ac3fe43809b625bc8f5bff9f Merge pull request #1673 from AndrejMitrovic/Fix6552 Issue 6552 - Invalid warning on non-existent switch case fallthrough. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6552] Wrong fallthrough warning for CaseRange
http://d.puremagic.com/issues/show_bug.cgi?id=6552 Andrej Mitrovic andrej.mitrov...@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 4481] ICE(glue.c, !vthis-csym) or compiles, depending on the import statements order
http://d.puremagic.com/issues/show_bug.cgi?id=4481 --- Comment #8 from kekeni...@yahoo.co.jp 2013-02-17 20:03:35 PST --- 2.062head has a regression caused by this problem, probably. Reduced test case is here. Command: dmd.exe bug2062a.d bug2062b.d bug2062a.d void call(alias pred, R)(R haystack) { foreach (e; haystack) { pred(e); break; } } bug2062b.d import bug2062a; class Foo { void member() { int[] r; int local; call!(p=local)(r); // ( (int p)=local ) works. } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7569] cannot void initialize tuple declarations
http://d.puremagic.com/issues/show_bug.cgi?id=7569 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull, rejects-valid CC||andrej.mitrov...@gmail.com AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 20:32:29 PST --- https://github.com/D-Programming-Language/dmd/pull/1674 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7364] Better Eponymous Template syntax
http://d.puremagic.com/issues/show_bug.cgi?id=7364 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||and...@erdani.com, ||andrej.mitrov...@gmail.com --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-17 20:58:38 PST --- Sample code to go with the request: fullyQualifiedNameImplForTypes from std.traits is currently (excerpt from code): static if (is(T == string)) { enum fullyQualifiedNameImplForTypes = string; } else static if (is(T == wstring)) { enum fullyQualifiedNameImplForTypes = wstring; } else static if (is(T == dstring)) { enum fullyQualifiedNameImplForTypes = dstring; } else static if (isBasicType!T || is(T == enum)) { enum fullyQualifiedNameImplForTypes = chain!((Unqual!T).stringof); } else static if (isAggregateType!T) { enum fullyQualifiedNameImplForTypes = chain!(fullyQualifiedNameImplForSymbols!T); } else static if (isStaticArray!T) { ... } With an enhancement it could be turned into: static if (is(T == string)) { enum this = string; } else static if (is(T == wstring)) { enum this = wstring; } else static if (is(T == dstring)) { enum this = dstring; } else static if (isBasicType!T || is(T == enum)) { enum this = chain!((Unqual!T).stringof); } else static if (isAggregateType!T) { enum this = chain!(fullyQualifiedNameImplForSymbols!T); } And for an alias example, current code: template TransitiveBaseTypeTuple(T) { static if (is(T == Object)) alias TypeTuple!() TransitiveBaseTypeTuple; else alias TypeTuple!(BaseClassesTuple!T, InterfacesTuple!T) TransitiveBaseTypeTuple; } With the enhancement: template TransitiveBaseTypeTuple(T) { static if (is(T == Object)) alias this = TypeTuple!(); else alias this = TypeTuple!(BaseClassesTuple!T, InterfacesTuple!T); } The main benefit isn't less typing but less error-prone metaprogramming. It is very easy to introduce a typo in a template which doesn't instantly trigger a compile-time error. Even if it does result in a compile-time error it is hard to figure out what went wrong, for example: template SomeEponymousTemplate(T) { static if (is(T == int)) alias SomeEponymousTemplate = int; else alias SomeEponymuosTemplate = float; // note the typo } void main() { alias Type = SomeEponymousTemplate!float; Type x; // line 25 } test(25): Error: template instance test.SomeEponymousTemplate!(float) is used as a type Note how the error appears when the type is used, not when the template is instantiated. I have had these instances of typos quote often in my metaprogramming code. I could resort to more vigorous copy-pasting, but this is a bad antipattern. Allowing 'this' in templates would be a an improvement. I'd like to hear from our BDFL's, perhaps we'll get a pre-approved tag if they agree. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9461] Ability to break typesystem with `inout`
http://d.puremagic.com/issues/show_bug.cgi?id=9461 --- Comment #3 from github-bugzi...@puremagic.com 2013-02-17 21:49:43 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3241c48f8bfd1e3bd0be0ee88a9b961baf42ff93 fix Issue 9461 - Ability to break typesystem with `inout` https://github.com/D-Programming-Language/dmd/commit/62e77c805ab01043c01da76f5a7ec3d67341399c Merge pull request #1633 from 9rnsr/fix9461 Issue 9461 - Ability to break typesystem with `inout` -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9461] Ability to break typesystem with `inout`
http://d.puremagic.com/issues/show_bug.cgi?id=9461 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 9526] ICE when compiling project with unittests
http://d.puremagic.com/issues/show_bug.cgi?id=9526 --- Comment #6 from Denis Shelomovskij verylonglogin@gmail.com 2013-02-18 09:52:38 MSK --- (In reply to comment #4) That's because in func.c void markAsNeedingClosure() doesn't check data when loops though the list. Can you test this commit https://github.com/mxfm/dmd/commit/f04bba02261b59a033495cf090711bf0a08dd64e ? ... Thanks a lot! Your change does fix dmd crash on Windows too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9530] New: std.path should have a function for getting the canonical path to a file or directory
http://d.puremagic.com/issues/show_bug.cgi?id=9530 Summary: std.path should have a function for getting the canonical path to a file or directory Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis jmdavisp...@gmx.com 2013-02-17 23:12:56 PST --- Take this example from std.path.absolutePath: assert (absolutePath(../file, /foo/bar)== /foo/bar/../file); Note the ../ in the path. absolutePath does note return the canonical path (which is what I would have expected it to do), but even if it's better for absolutePath to not return the canonical path, we still need a function which will do that, and I don't see one in std.path which does. So, I think that either absolutePath should be changed to return the canonical path (which presumably it has a good reason for not doing), or std.path needs a new function which does. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5061] std.traits.arrayTarget
http://d.puremagic.com/issues/show_bug.cgi?id=5061 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED CC||verylonglogin@gmail.com Resolution|FIXED | --- Comment #3 from Denis Shelomovskij verylonglogin@gmail.com 2013-02-18 10:30:43 MSK --- Not fixed. The enhancement is about arrays, not ranges. Phobos misses a lot of traits in regard to arrays. This one included. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6539] Incomprehensible error message with failed template instantiation
http://d.puremagic.com/issues/show_bug.cgi?id=6539 --- Comment #2 from github-bugzi...@puremagic.com 2013-02-17 23:31:04 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/652c113648fccd075c029a2915cf349b5f72688c fix Issue 6539 - Incomprehensible error message with failed template instantiation https://github.com/D-Programming-Language/dmd/commit/bf14ab826f3ef60b856d8265e8a8cf3e55ea2f70 Merge pull request #1661 from 9rnsr/fix6539 Issue 6539 - Incomprehensible error message with failed template instantiation -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9199] Module level qualified functions should be rejected
http://d.puremagic.com/issues/show_bug.cgi?id=9199 --- Comment #5 from github-bugzi...@puremagic.com 2013-02-17 23:38:40 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9be3402e51ee4b1384e9d9320f15b1a4d2f25059 fix Issue 9199 - Module level qualified functions should be rejected https://github.com/D-Programming-Language/dmd/commit/a22a1254ce29272dc223a1566e2e6ad24d65cd1d Merge pull request #1400 from 9rnsr/fix9199 Issue 9199 - Module level qualified functions should be rejected -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5061] std.traits.arrayTarget
http://d.puremagic.com/issues/show_bug.cgi?id=5061 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #4 from yebblies yebbl...@gmail.com 2013-02-18 18:49:27 EST --- Arrays _are_ ranges. This functionality is already in phobos. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---