D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15675 - [REG2.069] BinaryHeap!(Array!T) is built wrong
Summary: [REG2.069] BinaryHeap!(Array!T) is built wrong
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-12 15:40 UTC by Dragos Carp
Modified: 2016-02-16 20:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Dragos Carp 2016-02-12 15:40:17 UTC
Release v2.069.0 introduced following regression (v2.068.2 is ok)

---

import std.container : Array, heapify;

void main()
{
	int[] elements1 = [1, 2, 10, 12];
	auto heap1 = heapify(elements1);
	assert(heap1.front == 12);        // works as expected

	Array!int elements2 = [1, 2, 10, 12];
	auto heap2 = heapify(elements2);
	assert(heap2.front == 12);        // fails
}
Comment 1 Dragos Carp 2016-02-15 11:43:40 UTC
Fixed with https://github.com/D-Programming-Language/phobos/pull/4003
Comment 2 github-bugzilla 2016-02-16 16:49:50 UTC
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/b1537b3cb04d7714a8188e37e9a67191d21f26d9
Issue 15675 - BinaryHeap!(Array!T) is built wrong

https://github.com/D-Programming-Language/phobos/commit/b642e1023b5198c8012ee48bf86b0902a5fc4cb7
Merge pull request #4003 from dcarp/fix_15675

Issue 15675 - BinaryHeap!(Array!T) is built wrong