19161, "jhh67", "createHeap from array fails if comparator is specified", "2022-02-02T21:21:25Z"
Summary of Problem
Creating a heap from an array works if I don't specify a comparator, otherwise I get the following error:
foo.chpl:3: error: unresolved call 'createHeap([domain(1,int(64),false)] int(64), comparator=ReverseComparator(DefaultComparator))'
$CHPL_HOME/modules/standard/Heap.chpl:409: note: this candidate did not match: createHeap(const ref x: list(?t), param parSafe: bool = false, comparator = defaultComparator)
foo.chpl:3: note: because actual argument #1 with type '[domain(1,int(64),false)] int(64)'
$CHPL_HOME/modules/standard/Heap.chpl:409: note: is passed to formal 'const ref x: list'
foo.chpl:3: note: other candidates are:
$CHPL_HOME/modules/standard/Heap.chpl:425: note: createHeap(const ref x: [?d] ?t, param parSafe: bool = false, comparator = defaultComparator)
Steps to Reproduce
Source Code:
use Heap;
var foo = createHeap([1,1,1], comparator=reverseComparator);
Compile command:
chpl --no-devel foo.chpl
Execution command:
NA
Associated Future Test(s):
Configuration Information
Output of chpl --version:
chpl version 1.26.0 pre-release (27f3d59788)
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
Output of $CHPL_HOME/util/printchplenv --anonymize: