[Issue 5521] New: DMD 2.051 does not report column number of errors.
http://d.puremagic.com/issues/show_bug.cgi?id=5521 Summary: DMD 2.051 does not report column number of errors. Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: lewis1...@gmail.com --- Comment #0 from Lewis 2011-02-02 19:20:31 PST --- When DMD reports an error or warning, only the line number is reported. The column number or horizontal position is not. In this day of relatively large screens, we don't all program with 60 chars per line and I consider this a serious limitation, forcing the user to waste extra time on information the compiler already "knows". I am aware the error reporting process may take longer, but this more than offset by the shorter bug locating time that results. Every modern compiler has this feature, and DMD should follow suit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5520] New: bitfieldsOn
http://d.puremagic.com/issues/show_bug.cgi?id=5520 Summary: bitfieldsOn Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: ellery-newco...@utulsa.edu --- Comment #0 from Ellery Newcomer 2011-02-02 17:54:23 PST --- I think it would be nice to have a variation of bitfields which generates operations on a preexisting field, e.g. struct Z{ Foobar f; mixin(bitfieldsOn!("f.squirt.honk" bool, "buzz",1, uint, "fuzz",7, )); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
Re: auto return type inheritance not covariant
iLewis: > Maybe this has been brought up before, but i could find no previous > submissions. It looks like a bug fit for Bugzilla: class Foo { int fun1() { return 1; } auto fun2() { return 1; } auto fun3() { return 1; } } class Bar : Foo { override auto fun1() { return 1; } override int fun2() { return 1; } override auto fun3() { return 1; } } void main() {} Bye, bearophile
Re: auto return type inheritance not covariant
On Wednesday, February 02, 2011 15:31:02 iLewis wrote: > Maybe this has been brought up before, but i could find no previous > submissions. > > the following code compiles with the error "Error: function xxx.B.fn of > type () overrides but is not covariant with xxx.A.fn of type ()" even > though they both return an auto of type int... is this a bug or oversight > by myself? I am unable to find any documentation saying that this is > illegal. > > I realize its easy to fix by changing the return type to int, however i was > just curious. > > class A > { > auto fn() > { > return 10; > } > } > > class B : A > { > auto fn() > { > return 5; > } > } I'm not aware of a bug report on the matter. You should create one at http://d.puremagic.com/issues . Also, this list is not really intended to be posted to. It's for seeing the messages about changes to bug reports which the tracker sends. If you want to post questions, they should generally go to D.Learn or D. - Jonathan M Davis
auto return type inheritance not covariant
Maybe this has been brought up before, but i could find no previous submissions. the following code compiles with the error "Error: function xxx.B.fn of type () overrides but is not covariant with xxx.A.fn of type ()" even though they both return an auto of type int... is this a bug or oversight by myself? I am unable to find any documentation saying that this is illegal. I realize its easy to fix by changing the return type to int, however i was just curious. class A { auto fn() { return 10; } } class B : A { auto fn() { return 5; } }
[Issue 5519] New: Saner struct equality
http://d.puremagic.com/issues/show_bug.cgi?id=5519 Summary: Saner struct equality Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-02-02 15:07:06 PST --- Performing a comparison between two structs is a very common operation. Often structs contain strings and other things. Currently (DMD 2.051) the struct equality ignores the contents of strings contained inside structs, and this behaviour is unacceptably bug-prone in a language like D that's otherwise oriented toward code safety. So in the following four programs I'd like the assertions to pass. struct Foo { string s; } void main() { string s1 = "he"; string s2 = "llo"; string s3 = "hel"; string s4 = "lo"; auto f1 = Foo(s1 ~ s2); auto f2 = Foo(s3 ~ s4); assert((s1 ~ s2) == (s3 ~ s4)); assert(f1 == f2); // this asserts } struct Foo { int[] a; } void main() { auto a1 = [1, 2]; auto a2 = [3, 4, 5]; auto a3 = [1, 2, 3]; auto a4 = [4, 5]; auto f1 = Foo(a1 ~ a2); auto f2 = Foo(a3 ~ a4); assert((a1 ~ a2) == (a3 ~ a4)); assert(f1 == f2); // this asserts } class Bar { int x; this(int x_) { x = x_; } bool opEquals(Object o) { return x == (cast(Bar)o).x; } } struct Foo { Bar a; } void main() { auto f1 = Foo(new Bar(1)); auto f2 = Foo(new Bar(1)); assert(f1 == f2); // this asserts } struct Foo { int[int] aa; } void main() { auto f1 = Foo([1:0, 2:0]); auto f2 = Foo([1:0, 2:0]); assert(f1.aa == f2.aa); assert(f1 == f2); // this asserts } The title of this enhancement request is "Saner struct equality" instead of "Sane struct equality" because (it seems) D struct equality isn't meant/expected to be fully correct. This example shows a struct comparison problem this enhancement request doesn't cover: import core.stdc.string: memset; struct Foo { long l; byte b; } void main() { Foo f1 = Foo(10, 20); Foo f2; memset(&f1, 'X', Foo.sizeof); f2.l = 10; f2.b = 20; assert(f1 == f2); // this asserts } Surprisingly this works (DMD 2.051): struct Bar { int x; const bool opEquals(ref const(Bar) o) { return x == o.x || x == -o.x; } } struct Foo { Bar a; } void main() { auto f1 = Foo(Bar(1)); auto f2 = Foo(Bar(-1)); assert(f1 == f2); // this doesn't assert } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5349] ICE(toir.c): nested class in static member function
http://d.puremagic.com/issues/show_bug.cgi?id=5349 Don changed: What|Removed |Added Keywords||patch CC||clugd...@yahoo.com.au Summary|ICE(toir.c): Internal |ICE(toir.c): nested class |error: toir.c 190 |in static member function --- Comment #1 from Don 2011-02-02 12:34:12 PST --- PATCH: (D1 + D2) https://github.com/donc/dmd/commit/9832485500b07209172c3e9d960eac095ff50c3b https://github.com/donc/dmd/commit/9832485500b07209172c3e9d960eac095ff50c3b Test case: https://github.com/donc/dmd/commit/5332fa13cdda457f0a3dec6a0287fe1f8b738edd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5488] Spawned threads hang in a way that suggests allocation or gc issue
http://d.puremagic.com/issues/show_bug.cgi?id=5488 --- Comment #5 from Sean Kelly 2011-02-02 12:10:21 PST --- Okay, all issues related to this appear to have been fixed and changes checked in. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3833] pure/nothrow functions/delegates are a subtype of the nonpure/throw ones
http://d.puremagic.com/issues/show_bug.cgi?id=3833 --- Comment #2 from bearophile_h...@eml.cc 2011-02-02 10:15:39 PST --- This D2 program shows a cost of a strong type system: creating collections of functions becomes a problem because there are so many attributes that change a type. This specific problem is solved managing correctly variance/covariance of function pointers and delegates, typing the array 'a' as an array of impure nothrow @trusted functions: import std.math; void main() { auto a = [&asin, &cbrt]; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5518] New: No line number for incompatible types error message
http://d.puremagic.com/issues/show_bug.cgi?id=5518 Summary: No line number for incompatible types error message Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-02-02 10:13:23 PST --- This D2 program: import std.math; void main() { auto a = [&asin, &cbrt]; } Its error message lacks a line number: Error: incompatible types for ((& asin) ? (& cbrt)): 'real function(real x) pure nothrow @safe' and 'real function(real x) nothrow @trusted' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5517] New: SEGV: assert(false) in release mode
http://d.puremagic.com/issues/show_bug.cgi?id=5517 Summary: SEGV: assert(false) in release mode Product: D Version: D1 & D2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: ibuc...@ubuntu.com --- Comment #0 from Iain Buclaw 2011-02-02 02:53:53 PST --- void main() { assert(0); } When compiled in release mode, the instructions outputted by DMD cause a segfault and exit code 139 (on Linux). I expected an abort and exit code 134. $ dmd abort.d -release $ ./abort Segmentation fault (core dumped) $ echo $? 139 Disassembly of section .text._Dmain: <_Dmain>: void main() { 0:55 push %ebp 1:8b ecmov%esp,%ebp 3:f4 hlt Regards -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5510] std.functional.iterate
http://d.puremagic.com/issues/show_bug.cgi?id=5510 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #1 from bearophile_h...@eml.cc 2011-02-02 02:25:48 PST --- Closed, according to Andrei: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=128495 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---