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

Boolean.False == False is false #6076

Closed
jdunkerley opened this issue Mar 25, 2023 · 5 comments · Fixed by #6090
Closed

Boolean.False == False is false #6076

jdunkerley opened this issue Mar 25, 2023 · 5 comments · Fixed by #6090
Assignees
Labels
--bug Type: bug --regression Important: regression -compiler p-highest Should be completed ASAP

Comments

@jdunkerley
Copy link
Member

image

The dropdown puts in Boolean.True and Boolean.False. There is a problem that Boolean.False != False.

@jdunkerley jdunkerley added p-highest Should be completed ASAP --bug Type: bug -compiler --regression Important: regression labels Mar 25, 2023
@jdunkerley jdunkerley added this to the Design Partners milestone Mar 25, 2023
@jdunkerley
Copy link
Member Author

Possibly related:

[warn] [2023-03-25T15:55:24.566Z] [enso] Execution of function main failed (class org.enso.interpreter.runtime.callable.atom.BoxingAtom cannot be cast to class java.lang.Boolean (org.enso.interpreter.runtime.callable.atom.BoxingAtom is in unnamed module of loader com.oracle.graalvm.locator.GraalVMLocator$GuestLangToolsLoader @7ac9af2a; java.lang.Boolean is in module java.base of loader 'bootstrap')).
java.lang.ClassCastException: Some(class org.enso.interpreter.runtime.callable.atom.BoxingAtom cannot be cast to class java.lang.Boolean (org.enso.interpreter.runtime.callable.atom.BoxingAtom is in unnamed module of loader com.oracle.graalvm.locator.GraalVMLocator$GuestLangToolsLoader @7ac9af2a; java.lang.Boolean is in module java.base of loader 'bootstrap'))

@Akirathan Akirathan moved this from ❓New to 📤 Backlog in Issues Board Mar 27, 2023
@JaroslavTulach JaroslavTulach removed their assignment Mar 27, 2023
@JaroslavTulach
Copy link
Member

Thanks @Akirathan for taking a look.

@Akirathan
Copy link
Member

Possibly related:

I guess you mean exactly this:

> False.not
>>> true
> Boolean.False.not
Evaluation failed with: class org.enso.interpreter.runtime.callable.atom.BoxingAtom cannot be cast to class java.lang.Boolean (org.enso.interpreter.runtime.callable.atom.BoxingAtom is in unnamed module of loader com.oracle.graalvm.locator.GraalVMLocator$GuestLangToolsLoader @27912e3; java.lang.Boolean is in module java.base of loader 'bootstrap')

Does not seem related at first sight, because that is failing due to the casting done through invocation. Moreover, I tried running that snippet on engine from 12/2022, and it was still failing, so this issue is an old one.

> Boolean.False == False
>>> false

I will fix that, should be pretty much straightforward. The problem is that Boolean.False is an atom, whereas False is a literal value.

@JaroslavTulach
Copy link
Member

The problem is that Boolean.False is an atom, whereas False is a literal value.

The best fix is to make sure Boolean.False also resolves to a literal value, if possible.

@Akirathan Akirathan moved this from 📤 Backlog to ⚙️ Design in Issues Board Mar 27, 2023
@Akirathan Akirathan linked a pull request Mar 27, 2023 that will close this issue
5 tasks
@Akirathan Akirathan moved this from ⚙️ Design to 🔧 Implementation in Issues Board Mar 27, 2023
@Akirathan Akirathan moved this from 🔧 Implementation to 👁️ Code review in Issues Board Mar 27, 2023
@enso-bot
Copy link

enso-bot bot commented Mar 27, 2023

Pavel Marek reports a new STANDUP for today (2023-03-27):

Progress: Fixing the special handling for Boolean.False. Tried to do that "properly" via ApplicationSaturation compler phase, but gave that up after some time - Both False and Boolean.False could be just transformed to false literal in the IR, so that we don't have to special handling during runtime. It should be finished by 2023-03-28.

@mergify mergify bot closed this as completed in #6090 Mar 28, 2023
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--bug Type: bug --regression Important: regression -compiler p-highest Should be completed ASAP
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants