Skip to content

How to handle fields in subclasses when super classes have fields with same name? #42

Open
@smarr

Description

@smarr

As reported by @Hirevo, how do we want to handle it when subclasses define fields with the same name as fields in their super classes?

TestA = ( | a | foo = ( a println. a := 10. a println. ))

TestB = TestA ( | a | 
  run = (
    a := 1.
    a println.
    super foo.
     a println.
  )
)

This currently seems to ignore the field defined in TestB.
In yksom (@ltratt) it seems to crash according to @Hirevo.

A sensible language would probably shadow field a from TestA, which means it can't be accessed from TestB, and only TestB.a can be accessed as a separate field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFixes an issue, incorrect implementationspecNeeds specification, or is specification related.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions