We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A forall loop over a map's keys() or values() iterator fails to compile.
forall
map
keys()
values()
Source Code:
use Map; var m: map(int, int); for i in 1..100 do m[i] = i; var s = 0; forall k in m.keys() with (+ reduce s) do s += k; writeln(s);
Compile command: chpl foo.chpl
chpl foo.chpl
foo.chpl:1: In module 'foo': foo.chpl:8: error: A standalone or leader iterator is not found for the iterable expression in this forall loop
Ditto for m.values().
m.values()
Associated Future Test(s):
None yet
chpl version 1.33.0 built with LLVM version 14.0.0 (really, today's main) gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Ubuntu clang version 14.0.0-1ubuntu1.1 CHPL_TARGET_PLATFORM: linux64 CHPL_TARGET_COMPILER: llvm CHPL_TARGET_ARCH: x86_64 CHPL_TARGET_CPU: native * CHPL_LOCALE_MODEL: flat CHPL_COMM: gasnet * CHPL_COMM_SUBSTRATE: udp CHPL_GASNET_SEGMENT: everything CHPL_TASKS: qthreads CHPL_LAUNCHER: amudprun CHPL_TIMERS: generic CHPL_UNWIND: none CHPL_MEM: jemalloc CHPL_ATOMICS: cstdlib CHPL_NETWORK_ATOMICS: none CHPL_GMP: bundled CHPL_HWLOC: bundled CHPL_RE2: none CHPL_LLVM: system CHPL_AUX_FILESYS: none
The text was updated successfully, but these errors were encountered:
Boy, sure looks like they don't (and haven't since Map was introduced).
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Summary of Problem
A
forall
loop over amap
'skeys()
orvalues()
iterator fails to compile.Steps to Reproduce
Source Code:
Compile command:
chpl foo.chpl
Ditto for
m.values()
.Associated Future Test(s):
None yet
Configuration Information
The text was updated successfully, but these errors were encountered: