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

Add tests for re-binding #800

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 14, 2022

  1. Add tests for re-binding

    Moves re-binding tests from Rakudo into Roast, specifying when
    variables can and cannot be rebound.
    
    Here's a description of the behavior specified by these tests (though,
    of course, the tests themselves are more authoritative than this
    description):
    
     * Non-sigiled 'variables' and other terms cannot be rebound
     * Sigiled variables that weren't declared as part of a Signature can
       be rebound
     * Sigiled variables that were declared as part of a Signature can be
       rebound *only* if declared with `is copy` or `is rw`
    
    For the above "declared as part of a Signature" covers two cases:
     * function declaration: `sub f($a, $b) { }`
     * The signature that is created when a parenthesized expression is
       used as `:=`'s LHS in a variable declaration (see S02, spec'ed in
       S02-names-vars/signature.t): `my ($a, $b) := (42, 47);`
    codesections committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    e796bdf View commit details
    Browse the repository at this point in the history