Consider making CompileResult
members private.
#2475
Labels
code quality
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
enhancement
New feature or request
good first issue
Good for newcomers
P: medium
When reviewing #2472 I noticed it's possible to accidentally make an invalid
CompileResult
, where the author intended to return an 'ok' but set value toNone
.We should make it mandatory to use
CompileResult::ok()
andCompileResult::err()
to avoid this sort of thing. It would also required making a bunch of access methods for pulling the value or errors and/or warnings out which may turn out to be quite a pervasive change.The text was updated successfully, but these errors were encountered: