Skip to content

Can't create an alias for an implicit writer method #320

@apblack

Description

@apblack

A class (graceScope in module scope)contains a var declaration:

    var node is public

This implicitly creates a method node:=(nu) in that class. However, if one attempts to inherit from graceScope and create an alias for that method:

    inherit graceScope
        alias superNode:=(n) = node:=(n)

minigrace incorrectly raises an error:

scope.grace[346:32-40]: Syntax error: can't define an alias for node:=(_) because it is not present in the inherited object
 345:         alias superClear = clear
 346:         alias superNode:=(n) = node:=(n)
-------------------------------------^^^^^^^^^

Until this is fixed, the workaround is to change the name of the variable, and declare the reader and writer methods explicitly.

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