@CaptainLazarus Did you possibly define a module explicitly and include the code into it? Something like...
module Test {
// the code in the Primer here
}
(I stumbled on a similar problem before, so wondering if the reason for the error is the same.)
@ty1027 - I suspect you are right. The above code is tested nightly and works because it is in a "prototype module".
@CaptainLazarus - See the error handling primer for more info on prototype vs. explicit modules with strict error handling.
After PR #14360, these writeThis methods should be marked throws
proc Point.writeThis(w) throws
{
...
}
It would be appreciated if you can check if that resolves the issue for you and if so, make a PR against master making the change.
Tagging @dlongnecke-cray since this is an area he's worked in recently.
Sounds like there's some doc work to do.
After PR #14360, these writeThis methods should be marked
throwsproc Point.writeThis(w) throws { ... }It would be appreciated if you can check if that resolves the issue for you and if so, make a PR against master making the change.
I checked but I ran into other issues. If we do mark the function as _throws_ then we need to _catch_ whenever we use writeln() for a Point record, which to me seems very tedious. Any thoughts? @mppf
@CaptainLazarus Did you possibly define a module explicitly and include the code into it? Something like...
module Test { // the code in the Primer here }(I stumbled on a similar problem before, so wondering if the reason for the error is the same.)
This works

I don't know how to check if its initialized or not (still searching).
There shouldn't be a way for you to get access to an uninitialized record unless you're within an initializer routine itself.
Most helpful comment
@CaptainLazarus Did you possibly define a module explicitly and include the code into it? Something like...
(I stumbled on a similar problem before, so wondering if the reason for the error is the same.)