chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.75k stars 410 forks source link

fix tests broken by disallowing `x.init()`; disallow `x.postinit()` as well. #24933

Closed DanilaFe closed 2 weeks ago

DanilaFe commented 2 weeks ago

Closes #8991; fixes tests broken on main.

This PR adjusts some tests that seem to contradict each other on whether or not x.init() is allowed for arbitrary x. Based on discussion in #8991, it sounds like they should not be allowed. Ruling them out is a relatively simple post-parse check.

While there, I noted that x.postinit() is in a similar spot, and disallowed it too.

Reviewed by @benharsh -- thanks!

Testing

DanilaFe commented 2 weeks ago

Closing because for the time being, what to do about postinit is not very clear; sounds like we might be leaning towards allowing it to be invoked arbitrarily.