20438, "jhh67", "internal error passing 'nothing' as an argument", "2022-08-12T16:13:48Z"
Summary of Problem
examples/bar.chpl:11: In method 'encode':
examples/bar.chpl:12: internal error: RES-ADD-LLS-0805 chpl version 1.28.0 pre-release (0085fba89a)
Internal errors indicate a bug in the Chapel compiler ("It's us, not you"),
and we're sorry for the hassle. We would appreciate your reporting this bug --
please see https://chapel-lang.org/bugs.html for instructions. In the meantime,
the filename + line number above may be useful in working around the issue.
examples/bar.chpl:18: called as Foo.encode(value: nothing)
note: generic instantiations are underlined in the above callstack
Steps to Reproduce
Source Code:
class Encoder {
proc encode(ch:Foo, x) : void throws {}
}
class DefaultEncoder: Encoder {
override proc encode(ch:Foo, x) : void throws {}
}
record Foo {
var encoder: shared Encoder = new DefaultEncoder();
inline proc encode(value) : void throws {
this.encoder.encode(this, value);
}
}
var foo = new Foo();
var n: nothing;
foo.encode(n);
Compile command:
chpl bar.chpl
Execution command:
NA
Associated Future Test(s):
Configuration Information
- Output of
chpl --version:
chpl version 1.28.0 pre-release (0085fba89a)
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:
CHPL_TARGET_PLATFORM: darwin
CHPL_TARGET_COMPILER: clang
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none *
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: none *
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: none *
CHPL_AUX_FILESYS: none
- Back-end compiler and version, e.g.
gcc --versionorclang --version:
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
- (For Cray systems only) Output of
module list: