Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Early warning - future removal of the noshadow option for vg-for loops i.e. vg-for.noshadow  #301

@owenwaller

Description

@owenwaller

Following the Go 1.22 for loop changes that where previewed in G 1.21 and became the default in Go 1.22 the two tests:

wasm-test-suite/test-008-for-keyvalue and
wasm-test-suite/test-008-for-keyvalue-noshadow

result in identical behaviour. There is therefore no need for a separate noshadow option.

Te behaviour of the vg-for loop is documented in the markup section of the https://wwwvugu.org site.

The wasm-test-suite/test-008-for-keyvalue-noshadow is currently skipped because the test itself has not been updated to reflect the revised behaviour of the compiler.

Given the behaviour is now identical for both of these tests we would like to remove the vg-for.noshadow behaviour.

Doing so will be a breaking change to any code that makes use of the vg-for.noshadow option. Given that this is a fundamental change to Go itself, we do not plan on providing a alternative mechanism for the noshadow behaviour.

The current/default vg-for behaviour is consistent with Go 1.22's behaviour and will remain so.

There is no timeline for removal at present but we would anticipate that it occurs before the v1.0 release.

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