[Issue 7621] Immutable type equivalence problem
http://d.puremagic.com/issues/show_bug.cgi?id=7621 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Platform|x86 |All OS/Version|Windows |All --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 23:04:24 PDT --- https://github.com/D-Programming-Language/dmd/pull/838 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7768] New: More readable template error messages
http://d.puremagic.com/issues/show_bug.cgi?id=7768 Summary: More readable template error messages Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2012-03-24 23:23:43 PDT --- This code has bad usage of std.conv.parse template function. But raised error message is less readable. import std.conv; void test1() { int value; parse(value); // Error: template std.conv.parse(Target,Source) // if (isSomeChar!(ElementType!(Source)) isIntegral!(Target)) // does not match any function template declaration // Error: template std.conv.parse(Target,Source) // if (isSomeChar!(ElementType!(Source)) isIntegral!(Target)) // cannot deduce template function from argument types !()(int) } parse template function is overloaded, so printing template parameter and constraint is much confusing. It should print like follows: // Error: template std.conv.parse does not match any // function template declaration // Error: template std.conv.parse cannot deduce template function // from argument types !()(int) } matches more than one template declaration error message has same problem. void foo(T)(T val) if (is(T : int)) {} void foo(T)(T val) if (is(T : long)) {} void test2() { foo(10); // Error: template test.foo(T) if (is(T : int)) foo(T) if (is(T : int)) // matches more than one template declaration, // test.d(29):foo(T) if (is(T : int)) and // test.d(30):foo(T) if (is(T : long)) should print: // Error: template test.foo matches more than one template declaration, // test.d(29):foo(T) if (is(T : int)) and // test.d(30):foo(T) if (is(T : long)) } If there is only one template function, keeping specialized error message is better. void bar(T)(T val) if (is(T : int)) {} void test3() { bar(abc); // Error: test.bar does not match any function template declaration // Error: template test.bar(T) if (is(T : int)) cannot deduce // template function from argument types !()(string) } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7768] More readable template error messages
http://d.puremagic.com/issues/show_bug.cgi?id=7768 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 23:26:33 PDT --- https://github.com/D-Programming-Language/dmd/pull/839 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7769] New: relax inout rule doesn't work for template function
http://d.puremagic.com/issues/show_bug.cgi?id=7769 Summary: relax inout rule doesn't work for template function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2012-03-24 23:29:44 PDT --- In 2.059head, inout rule was relaxed properly. Therefore, following code should work. void f(K)(inout(K) value){} void main() { f(abc); } But it raisees errors: Error: template test.f(K) does not match any function template declaration Error: template test.f(K) cannot deduce template function from argument types !()(string) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7743] Parsing problem with nothrow delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7743 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7761] lambda expression doesn't parse attributes
http://d.puremagic.com/issues/show_bug.cgi?id=7761 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7769] relax inout rule doesn't work for template function
http://d.puremagic.com/issues/show_bug.cgi?id=7769 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 23:53:12 PDT --- https://github.com/D-Programming-Language/dmd/pull/840 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7768] More readable template error messages
http://d.puremagic.com/issues/show_bug.cgi?id=7768 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||and...@metalanguage.com --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-25 01:16:57 PDT --- *** Issue 2696 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 2696] Spurious ifclause of template function shown in error message
http://d.puremagic.com/issues/show_bug.cgi?id=2696 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-25 01:16:57 PDT --- *** This issue has been marked as a duplicate of issue 7768 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7331] ICE(toir.c) on curried delegate literal where the first of 3 arguments is referenced
http://d.puremagic.com/issues/show_bug.cgi?id=7331 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-25 03:11:59 PDT --- It works with 2.059head (d2183ba7aab0d62b91ac230e8a532e9a14699c2f) -- 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 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #6 from Kenji Hara k.hara...@gmail.com 2012-03-25 03:18:02 PDT --- *** Issue 7324 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 7324] Access Violation when printing struct with union
http://d.puremagic.com/issues/show_bug.cgi?id=7324 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-25 03:18:02 PDT --- *** This issue has been marked as a duplicate of issue 7230 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3731] Derived class implicitly convertible to base class with arbitrary change of constancy
http://d.puremagic.com/issues/show_bug.cgi?id=3731 Stewart Gordon s...@iname.com changed: What|Removed |Added Summary|Can implicitly cast an |Derived class implicitly |immutable reference to a|convertible to base class |derived class |with arbitrary change of ||constancy --- Comment #9 from Stewart Gordon s...@iname.com 2012-03-25 07:52:59 PDT --- (In reply to comment #1) The solution would be to make it illegal to have a mutable class reference to the base class. No, because a Zmienna is perfectly allowed to be mutable. It's Stala that isn't. In your example, this line should be an error: Zmienna zm = st; // error, must use immutable(Zmienna) or const(Zmienna) Correct, since because Stala is immutable, any object reference of type Stala is actually of type immutable(Stala). The bug is that constancy is ignored when converting from a derived class to a base class, as this code shows (DMD 2.058, Win32): -- class Base { int x; } class Derived : Base { int y; } void main() { Derivedmd; const(Derived) cd; immutable(Derived) id; Base mb_md = md; const(Base)cb_md = md; immutable(Base)ib_md = md; // accepts-invalid Base mb_cd = cd; // accepts-invalid const(Base)cb_cd = cd; immutable(Base)ib_cd = cd; // accepts-invalid Base mb_id = id; // accepts-invalid const(Base)cb_id = id; immutable(Base)ib_id = id; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7771] New: [ICE][CTFE] With maketrans and string slicing
http://d.puremagic.com/issues/show_bug.cgi?id=7771 Summary: [ICE][CTFE] With maketrans and string slicing 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-03-25 12:19:38 PDT --- import std.ascii: letters, uppercase; import std.string: maketrans; immutable r = maketrans(uppercase, uppercase[13 .. $] ~ uppercase[0 .. 13]); void main() {} DMD 2.059head: Assertion failure: '!v-isDataseg() || v-isCTFE()' on line 108 in file 'interpret.c' With small changes it crashes in another point: import std.string: maketrans; void main() { immutable s = foo; static r = maketrans(s, s[0 .. $]); } DMD 2.059head: Assertion failure: 'v-ctfeAdrOnStack = 0 v-ctfeAdrOnStack stackPointer()' on line 97 in file 'interpret.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7442] ctRegex!`\p{Letter}` uses a lot memory in compilation
http://d.puremagic.com/issues/show_bug.cgi?id=7442 josvanu...@gmail.com changed: What|Removed |Added CC||josvanu...@gmail.com --- Comment #2 from josvanu...@gmail.com 2012-03-25 12:18:47 PDT --- Same here (win7). Either of these cause out of memory error: enum r1 = ctRegex!`\w`; enum r2 = ctRegex!`\W`; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7770] New: __dollar cannot be read at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=7770 Summary: __dollar cannot be read at compile time 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-03-25 12:18:47 PDT --- D2 code: import std.ascii: uppercase; import std.string: maketrans; void main() { static r = maketrans(uppercase, uppercase[0 .. $]); } DMD 2.059head: test.d(4): Error: variable __dollar cannot be read at compile time test.d(4):called from here: maketrans(cast(const(char[]))uppercase,cast(const(char[]))uppercase[0u..__dollar]) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7772] New: Remove volatile statements from core.thread
http://d.puremagic.com/issues/show_bug.cgi?id=7772 Summary: Remove volatile statements from core.thread Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-03-25 12:20:57 PDT --- This is problematic for build tools that manually compile druntime/phobos. Without -d core.thread won't compile. I don't know why it's ok to ship code with DMD that requires deprecated features: D:\DMD\dmd2\src\druntime\src\core\thread.d(888): volatile statements deprecated; use synchronized statements instead D:\DMD\dmd2\src\druntime\src\core\thread.d(2953): volatile statements deprecated; use synchronized statements instead D:\DMD\dmd2\src\druntime\src\core\thread.d(3960): volatile statements deprecated; use synchronized statements instead D:\DMD\dmd2\src\druntime\src\core\thread.d(3968): volatile statements deprecated; use synchronized statements instead D:\DMD\dmd2\src\druntime\src\core\thread.d(3995): volatile statements deprecated; use synchronized statements instead D:\DMD\dmd2\src\druntime\src\core\thread.d(4004): volatile statements deprecated; use synchronized statements instead -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7773] New: UCFS syntax on built-in attributes too?
http://d.puremagic.com/issues/show_bug.cgi?id=7773 Summary: UCFS syntax on built-in attributes too? Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-03-25 12:21:05 PDT --- Is UCFS syntax supposed to be supported in this case too? import std.stdio; void main() { (int.max).writeln(); // OK int.max.writeln(); // error } DMD 2.059head gives: test.d(4): no identifier for declarator int test.d(4): semicolon expected, not '.' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7742] 'More initializers than fields' error with correct number of fields
http://d.puremagic.com/issues/show_bug.cgi?id=7742 --- Comment #2 from github-bugzi...@puremagic.com 2012-03-25 12:30:52 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/92c8e7bdcc9ad100f8efca5cac1095ff255413d3 fix issue 7742 - 'More initializers than fields' error with correct number of fields -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7742] 'More initializers than fields' error with correct number of fields
http://d.puremagic.com/issues/show_bug.cgi?id=7742 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7774] New: I've found a bug in D2
http://d.puremagic.com/issues/show_bug.cgi?id=7774 Summary: I've found a bug in D2 Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: vangelisfore...@yandex.ru --- Comment #0 from Andrey Derzhavin vangelisfore...@yandex.ru 2012-03-25 12:33:25 PDT --- Try next code: import std.stdio; template TX(T) { struct A { T x; T y; public void opOpAssign(string op)(double d) { debug writeln(op); if (op == +)// += { x += cast(T)d; y += cast(T)d; } else if (op == -) // -= { x -= cast(T)d; y -= cast(T)d; } else if (op == *) // *= { x *= cast(T)d; y *= cast(T)d; } else if (op == /) // /= { x /= cast(T)d; y /= cast(T)d; } else if (op == %) // %= { x %= cast(T)d; y %= cast(T)d; } } } } void main(string[] args) { TX!(double).A a; a.x =10; a.y = 10; a%=8.0; writeln(a.x, , a.y); } You'll see that the a.x won't change. It must be 2 after %= operation. Thank you. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7774] I've found a bug in D2
http://d.puremagic.com/issues/show_bug.cgi?id=7774 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added CC||dmitry.o...@gmail.com --- Comment #1 from Dmitry Olshansky dmitry.o...@gmail.com 2012-03-25 12:59:59 PDT --- I'm using your exact code, it works fine here on dmd2.059head win7 and prints 2 2 Your version of dmd, system spec? PS: I totally expected thouse ifs to be static ifs. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7775] New: std.range.chunks on const array of strings too
http://d.puremagic.com/issues/show_bug.cgi?id=7775 Summary: std.range.chunks on const array of strings too Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-03-25 13:02:09 PDT --- import std.range: chunks; import std.array: join; void main() { const data = [a1, b2, c3, d4, e5]; foreach (c; chunks(data, 2)) string r = join(c); } DMD 2.059head gives: test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) isInputRange!(ElementType!(RoR)) isForwardRange!(R) is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R does not match any function template declaration test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) isInputRange!(ElementType!(RoR)) isForwardRange!(R) is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R cannot deduce template function from argument types !()(const(immutable(char)[])[]) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7777] New: std.typecons.Typedef problem with global arrays
http://d.puremagic.com/issues/show_bug.cgi?id= Summary: std.typecons.Typedef problem with global arrays 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-03-25 13:03:53 PDT --- This D2 code compiles with -d: typedef double[3] V3; V3 v1 = [30, 30, -50]; void main() { V3 v2 = [30, 30, -50]; } But this: import std.typecons: Typedef; alias Typedef!(double[3]) V3; V3 v1 = [30, 30, -50]; // error V3 v2 = V3([30, 30, -50]); // OK void main() { V3 v3 = [30, 30, -50]; // OK V3 v4 = V3([30, 30, -50]); // OK } with DMD 2.059head gives: test.d(3): Error: cannot use array to initialize Typedef!(double[3u],[nan,nan,nan]) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7776] New: std.array.join on const array of strings too
http://d.puremagic.com/issues/show_bug.cgi?id=7776 Summary: std.array.join on const array of strings too Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-03-25 13:03:00 PDT --- import std.array: join; void main() { string[] data1 = [foo, bar]; auto r1 = join(data1, _); // OK const string[] data2 = [foo, bar]; auto r2 = join(data2, _); // error } DMD 2.059head gives: test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) isInputRange!(ElementType!(RoR)) isForwardRange!(R) is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R does not match any function template declaration test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) isInputRange!(ElementType!(RoR)) isForwardRange!(R) is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R cannot deduce template function from argument types !()(const(immutable(char)[][]),string) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7774] I've found a bug in D2
http://d.puremagic.com/issues/show_bug.cgi?id=7774 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #2 from bearophile_h...@eml.cc 2012-03-25 13:06:05 PDT --- If confirmed this bug report needs a better name :-) (In reply to comment #1) PS: I totally expected thouse ifs to be static ifs. Those variables are known at compile-time, so a good compiler is supposed to remove the useless if branches (quite probably dmd does it). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7094] More initializers than struct fields for static member creation
http://d.puremagic.com/issues/show_bug.cgi?id=7094 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from bearophile_h...@eml.cc 2012-03-25 13:23:16 PDT --- *** This issue has been marked as a duplicate of issue 7742 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7742] 'More initializers than fields' error with correct number of fields
http://d.puremagic.com/issues/show_bug.cgi?id=7742 --- Comment #3 from bearophile_h...@eml.cc 2012-03-25 13:23:16 PDT --- *** Issue 7094 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 7774] I've found a bug in D2
http://d.puremagic.com/issues/show_bug.cgi?id=7774 timon.g...@gmx.ch changed: What|Removed |Added Status|NEW |RESOLVED CC||timon.g...@gmx.ch Resolution||WORKSFORME --- Comment #3 from timon.g...@gmx.ch 2012-03-25 13:48:49 PDT --- You have found a bug in DMD 2.058, not in D2. Smaller test case: struct A{ double x; void f(double d){x%=cast(double)d;} } void main(){ auto a=A(10); a.f(8); assert(a.x!=10.0); } Works with DMD 2.059head, fails with DMD 2.058. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7778] New: regression(DMD 2.059head) Segmentation fault on 'auto foo(){bar[]r; r~=[]; }'
http://d.puremagic.com/issues/show_bug.cgi?id=7778 Summary: regression(DMD 2.059head) Segmentation fault on 'auto foo(){bar[]r;r~=[];}' Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: timon.g...@gmx.ch --- Comment #0 from timon.g...@gmx.ch 2012-03-25 14:57:39 PDT --- This code snippet crashes DMD 2.059head: --- auto foo(){bar[]r;r~=[];} --- It does not crash DMD 2.058 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7779] New: D1-style opWhatever method is chosen in preference to opBinary under D2
http://d.puremagic.com/issues/show_bug.cgi?id=7779 Summary: D1-style opWhatever method is chosen in preference to opBinary under D2 Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: s...@iname.com --- Comment #0 from Stewart Gordon s...@iname.com 2012-03-25 15:07:57 PDT --- DMD 2.058, Win32 http://dlang.org/operatoroverloading.html#Binary `The expression: a op b is rewritten as both: a.opBinary!(op)(b) b.opBinaryRight!(op)(a) and the one with the ‘better’ match is selected. It is an error for both to equally match.` No mention of opAdd, etc. in there. Nonetheless, if such a method is present, it is chosen instead of behaving according to spec: -- import std.stdio; class Qwert { Qwert opBinary(string op : +)(Qwert yuiop) { puts(opBinary); return yuiop; } Qwert opAdd(Qwert yuiop) { puts(opAdd); return this; } } void main() { Qwert asdfg = new Qwert; asdfg = asdfg + asdfg; } -- C:\Users\Stewart\Documents\Programming\D\Testsopbinary_opadd opAdd -- (DMD 2.058 Win32) The spec gives opBinary/opBinaryRight as the way the AddExpression is resolved; yet the compiler does something else instead. It might be reasonable as as backward compatibility measure for the opAdd to be used as a fallback if there's no matching opBinary or opBinaryRight. But it's undocumented behaviour. When a matching opBinary is present, by allowing an undocumented feature to override a documented one the compiler is going against the spec. Swapping the order opBinary and opAdd in the code doesn't change the behaviour. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7781] New: Segmentation fault on 'mixin({return;}());'
http://d.puremagic.com/issues/show_bug.cgi?id=7781 Summary: Segmentation fault on 'mixin({return;}());' Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: timon.g...@gmx.ch --- Comment #0 from timon.g...@gmx.ch 2012-03-25 16:04:35 PDT --- The following code crashes DMD: mixin({return;}()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7782] New: [ICE] With wrong import syntax
http://d.puremagic.com/issues/show_bug.cgi?id=7782 Summary: [ICE] With wrong import syntax Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-03-25 16:18:41 PDT --- Wrong D2 code (it contains a simple typing mistake I have done, a dot instead of a comma): import std.algorithm, std.range. std.math; void main() { iota(10); } DMD 2.059head crashes and shows: Assertion failure: 'p-isPackage()' on line 1173 in file 'module.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7781] [CTFE] Segmentation fault on 'mixin({return;}());'
http://d.puremagic.com/issues/show_bug.cgi?id=7781 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Summary|Segmentation fault on |[CTFE] Segmentation fault |'mixin({return;}());' |on 'mixin({return;}());' --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-25 16:42:14 PDT --- This is CTFE issue. In interpret.c, Expression *scrubReturnValue(Loc loc, Expression *e) - e == EXP_VOID_INTERPRET -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7770] __dollar cannot be read at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=7770 d...@dawgfoto.de changed: What|Removed |Added Status|NEW |RESOLVED CC||d...@dawgfoto.de Resolution||INVALID --- Comment #1 from d...@dawgfoto.de 2012-03-25 17:38:04 PDT --- D has no runtime initialization for static variables. Therefor the initializer must be constant. The error message could be better though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7770] __dollar cannot be read at compile time
http://d.puremagic.com/issues/show_bug.cgi?id=7770 d...@dawgfoto.de changed: What|Removed |Added Keywords||CTFE Status|RESOLVED|REOPENED Resolution|INVALID | --- Comment #2 from d...@dawgfoto.de 2012-03-25 17:48:06 PDT --- cat bug.d CODE immutable char[5] foo = abcde; int bar(string a, string b) { return 0; } void baz() { enum s = bar(foo, foo[0 .. $]); } // Assertion failed: (!v-isDataseg() || v-isCTFE()), function push, file interpret.c, line 108. version (none) enum s = bar(foo, foo[0 .. $]); CODE dmd -c bug Sorry, you're point was obviously that __dollar should be resolvable at compile time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7751] [ICE] (Regression 2.059head) From auto and forward reference
http://d.puremagic.com/issues/show_bug.cgi?id=7751 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Summary|[ICE] From auto and forward |[ICE] (Regression |reference |2.059head) From auto and ||forward reference Severity|major |regression -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7621] Immutable type equivalence problem
http://d.puremagic.com/issues/show_bug.cgi?id=7621 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7783] New: compiler generated struct equality doesn't compare array fields
http://d.puremagic.com/issues/show_bug.cgi?id=7783 Summary: compiler generated struct equality doesn't compare array fields Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2012-03-25 22:10:53 PDT --- cat bug.d CODE struct Foo { string name; bool b; } void main() { auto a = Foo(foobar.idup, true); auto b = Foo(foobar.idup, true); assert(a == b); } CODE dmd -run bug The structures are compared bitwise which fails here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---