Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat Boolean.False as false primitive #6090

Merged
merged 3 commits into from
Mar 28, 2023

Conversation

Akirathan
Copy link
Member

@Akirathan Akirathan commented Mar 27, 2023

Fixes #6076

Pull Request Description

Treat Boolean.False and Boolean.True as the corresponding primitives. Now, Boolean.False == False returns true.

Important Notes

False and True constructs, that are converted to ConstructorNode during Truffle codegen, are handled specially in ConstructorNode. The easiest fix was to implement a similar special handling in QualifiedAccessorNode, although not the cleanest one.

A better solution would be to provide transformation of Boolean.True IR to a true literal in ApplicationSaturation compiler pass. But ApplicationSaturation pass does not handle True. Moreover, for our case, it is unnecessarily complicated.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@Akirathan Akirathan linked an issue Mar 27, 2023 that may be closed by this pull request
@Akirathan Akirathan requested a review from hubertp as a code owner March 27, 2023 16:13
@@ -199,7 +199,7 @@ object DistributionPackage {
path.globRecursive("*.enso").get().toSet
) { diff =>
if (diff.modified.nonEmpty) {
println(s"Generating index for ${libName} ")
log.info(s"Generating index for $libName")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hubertp I hope it is not a problem to replace this with log.info. I did it because locally, I connect to the SBT server via socket, and it sends me back only messages from logging, and this message was just discarded.

@Akirathan Akirathan self-assigned this Mar 27, 2023
@Akirathan Akirathan added the CI: No changelog needed Do not require a changelog entry for this PR. label Mar 27, 2023
@Akirathan Akirathan added the CI: Ready to merge This PR is eligible for automatic merge label Mar 27, 2023
@mergify mergify bot merged commit 9bec3a4 into develop Mar 28, 2023
@mergify mergify bot deleted the wip/akirathan/boolean-false-equals-6076 branch March 28, 2023 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Boolean.False == False is false
2 participants