openroberta-lab icon indicating copy to clipboard operation
openroberta-lab copied to clipboard

Condition `true == null` causes incorrect behaviour in simulation

Open Caffetaria opened this issue 5 years ago • 3 comments

Describe the bug

  • When an 'if' block is used with the condition true != null, the do block does not execute. This is not the expected behaviour in usual programming languages.

To Reproduce Steps to reproduce the behavior:

  1. Create a nepo program.
  2. Use the if block.
  3. Use the condition "true != null".
  4. Do statement does not execute in the simulation.

Expected behavior

  • The 'do' statement of the 'if' block should execute as "true != null" evaluates to true.

Screenshots

Screen Shot 2020-01-04 at 9 30 49 PM Screen Shot 2020-01-04 at 9 25 43 PM

Device information

  • Type: Desktop
  • OS: MacOS
  • Browser: Chrome

Additional context

  • Seems to happen in other robot simulations as well.

Caffetaria avatar Jan 04 '20 16:01 Caffetaria

should be fixed together with #306

bjost2s avatar Feb 12 '20 09:02 bjost2s

Seems to be solved with the new simulation.

test

RaghuvirShirodkar avatar Oct 04 '22 07:10 RaghuvirShirodkar

The problem is not solved, because "if true == null" produces same result.

bjost2s avatar Oct 04 '22 09:10 bjost2s