Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Function parameters in blocks are visible as "global" variables #180

@Windwoes

Description

@Windwoes

As I was helping our sister team that uses Blocks, I noticed that function parameters are listed as "global" variables, i.e. lumped into the same menu as "normal" variables.

This is extremely confusing and makes absolutely no sense at all. At a minimum, parameter variables should not "click" into place in functions other than their parents. However, having them be a different color and accessible through the little gear icon on the function (rather than through the variables pane) would also be a good idea.

Additionally, I feel like there's a possibility for undefined behavior here, because (as mentioned before) you can click a parameter block for funcationA into some code functionB. I would have no idea what the value of this variable would be when used outside its parent function. In C, returning a pointer to a local variable will cause undefined behavior because that method's stack will have been freed.

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