Thread overview | ||||||
---|---|---|---|---|---|---|
|
August 13, 2015 SList container problem | ||||
---|---|---|---|---|
| ||||
have upgraded from 2.066.1 to 2.068.0, and have a change in behaviour: import std.container: SList; void main() { SList!int tmp; tmp.insertAfter( tmp[], 3 ); } used to work happily with dmd2.066.1, causes assert (core.exception.AssertError@std/container/slist.d(57): Assertion failure) in 2.068.0 (also 2.067.1). There was a change in slist.d in 2.067. Am I no longer able to start from an empty list? --ted |
August 13, 2015 Re: SList container problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to ted | On Thursday, 13 August 2015 at 08:40:13 UTC, ted wrote:
>
> have upgraded from 2.066.1 to 2.068.0, and have a change in behaviour:
>
> import std.container: SList;
>
> void main()
> {
> SList!int tmp;
>
> tmp.insertAfter( tmp[], 3 );
> }
>
> used to work happily with dmd2.066.1, causes assert (core.exception.AssertError@std/container/slist.d(57): Assertion failure) in 2.068.0 (also 2.067.1).
>
> There was a change in slist.d in 2.067. Am I no longer able to start from an empty list?
>
> --ted
tmp ~= 3; ?
|
August 14, 2015 Re: SList container problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nicholas Wilson | thanks for the reply...
the method you described is suitable for appending to an array, but I'm using the singly-linked-list container.
I've extended the test, and I'm pretty sure it's a bug...
--ted
Nicholas Wilson wrote:
> On Thursday, 13 August 2015 at 08:40:13 UTC, ted wrote:
>>
>> have upgraded from 2.066.1 to 2.068.0, and have a change in behaviour:
>>
>> import std.container: SList;
>>
>> void main()
>> {
>> SList!int tmp;
>>
>> tmp.insertAfter( tmp[], 3 );
>> }
>>
>> used to work happily with dmd2.066.1, causes assert
>> (core.exception.AssertError@std/container/slist.d(57):
>> Assertion failure) in 2.068.0 (also 2.067.1).
>>
>> There was a change in slist.d in 2.067. Am I no longer able to start from an empty list?
>>
>> --ted
>
> tmp ~= 3; ?
|
August 14, 2015 Re: SList container problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to ted | https://issues.dlang.org/show_bug.cgi?id=14920 |
Copyright © 1999-2021 by the D Language Foundation