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: