On Tue, 02 Apr 2013 01:22:26 -0400, Maxim Fomin
wrote:
On Monday, 1 April 2013 at 23:56:08 UTC, Steven Schveighoffer wrote:
No, AA's are not classes (which BTW have had that problem fixed), they
are pImpl structs. The equals operator should check for null before
comparing the contents.
thanks I didn't know... must've been buried in the specs somewhere...
On Tue, Apr 2, 2013 at 12:10 AM, Jonathan M Davis wrote:
> On Monday, April 01, 2013 23:44:43 Timothee Cour wrote:
>> can we officially use
>>
>> assert(a);
>>
>> instead of
>>
>> assert(a !is null);
>>
>> (likewise with if(...
On Monday, April 01, 2013 23:44:43 Timothee Cour wrote:
> can we officially use
>
> assert(a);
>
> instead of
>
> assert(a !is null);
>
> (likewise with if(...))
>
> It seems to compile and work just fine, and is shorter.
That depends on what a is. If it's an AA as in the OP, then yes, they s
can we officially use
assert(a);
instead of
assert(a !is null);
(likewise with if(...))
It seems to compile and work just fine, and is shorter.
On Monday, 1 April 2013 at 23:56:08 UTC, Steven Schveighoffer
wrote:
No, AA's are not classes (which BTW have had that problem
fixed), they are pImpl structs. The equals operator should
check for null before comparing the contents. It is a valid
bug.
-Steve
This argument can be applied to
On Tuesday, 2 April 2013 at 00:10:51 UTC, H. S. Teoh wrote:
So reopen it.
bearophile already did. I just wanted the dust to settle, to see
if there was consensus about it being a bug.
On Tue, Apr 02, 2013 at 01:57:14AM +0200, digitalmars-d-boun...@puremagic.com
wrote:
> On Monday, 1 April 2013 at 23:56:08 UTC, Steven Schveighoffer wrote:
> >No, AA's are not classes (which BTW have had that problem fixed),
> >they are pImpl structs. The equals operator should check for null
> >
Luís Marques:
Baah, I had already closed the bug while cowering in shame! ;-)
Don't be ashamed for mistakes like this.
Bye,
bearophile
On Monday, 1 April 2013 at 23:56:08 UTC, Steven Schveighoffer
wrote:
No, AA's are not classes (which BTW have had that problem
fixed), they are pImpl structs. The equals operator should
check for null before comparing the contents. It is a valid
bug.
Baah, I had already closed the bug while
On Mon, 01 Apr 2013 19:12:52 -0400, Jonathan M Davis
wrote:
On Monday, April 01, 2013 22:32:01 =?UTF-8?B?Ikx1w61z?=.Marques
@puremagic.com wrote:
I added a bug to the database, because the following code results
in a segfault (DMD v2.062, OS X 10.8.3, 64-bit):
#!/usr/local/bin/rdmd
@safe:
Oops, I knew that but totally forgot --;;
I shouldn't spend so much time without using D *shame*
Thanks!
On Monday, April 01, 2013 22:32:01 =?UTF-8?B?Ikx1w61z?=.Marques
@puremagic.com wrote:
> I added a bug to the database, because the following code results
> in a segfault (DMD v2.062, OS X 10.8.3, 64-bit):
>
> #!/usr/local/bin/rdmd
>
> @safe:
>
> void main()
> {
> int[string] a;
> a["foo"] = 0;
I added a bug to the database, because the following code results
in a segfault (DMD v2.062, OS X 10.8.3, 64-bit):
#!/usr/local/bin/rdmd
@safe:
void main()
{
int[string] a;
a["foo"] = 0;
a.remove("foo");
assert(a != null); // segfault (not except
13 matches
Mail list logo