Skip to content

When we skip a message, it puts nil on the stack instead of self #31

Closed

Description

@adri09070

When you skip a message send, the skip command puts nil on the stack as a replacement value.

For example, if we have this:

a := 1 + 2

and if we skip the + message and then step over the assignment, a will be equal to nil.
We would expect it to be equal to 1 because we expect that skipping a message would mean that the message hasn't been sent to the receiver. So we would expect that the result of skipping a message is the receiver itself.

Furthermore, if the result of skipping a message is nil, it means that if we skip a message in a message sends chain, we can't step without having an exception signalled because nil doesn't understand any message. Letting the receiver on the stack instead of putting nil allows more possibilities at this level

Activity

  1. changed the title [-]When we skip a message, it puts nil on the stack instead of nil[/-] [+]When we skip a message, it puts nil on the stack instead of self[/+] on Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions