Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my adventures to make everything in #426 work properly, I discovered that the compiler has a function
Core.Compiler.widenconst
, which is almost exactly what myMooncake._type
function does.This PR looks at replacing Mooncake's
_type
functionalitywith
widenconst`, as this is obviously a better thing to do.There's a slight discrepancy between how
CC.widentconst
andMooncake._type
handleCC.Conditional
s, but I suspect my version is just wrong.In this PR I've replaced the various methods of
_type
with a single method that just defers the call toCC.widenconst
. This was the quickest way to make a PR and see if it works. If CI passes, I'll remove the_type
function entirely, and replace all calls to_type
withwidenconst
before merging.