Skip to content

Twigilless attribute specifications should be forbidden #521

@lizmat

Description

@lizmat

From rakudo/rakudo#6097:

role A {
    has %types;
    %types{::?CLASS.^name} = ::?CLASS;
    method dump-types {
        dd %types
    }
}
===SORRY!=== Error while compiling foo
Variable %!types used where no 'self' is available
at foo:3
------>     %types⏏{::?CLASS.^name} = ::?CLASS;

I think that the use of has $foo without a sigil should be forbidden exactly because the expectations that it brings, and the puzzling error messages that it may create.

Metadata

Metadata

Assignees

No one assigned

    Labels

    languageChanges to the Raku Programming Language

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions