Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

Remove inheritance protection

Version 1
Created 2009-07-11
StatusApproved
Last modified 2009-07-11
Author
BreaksProbably Little

Abstract

Non-public inheritance in a single inheritance language that has a single root object hierarchy makes little sense.

Rationale

Hiding ‘Object’ level attributes from a class leads to strange behavior.

Description

The compiler is behaving as spec’ed, but the value and correctness of this part of the spec is in question.

The suggested change, effectively drop one line from the grammar.

    SuperClass?:
        Identifier
        Protection Identifier // delete

An alternative would be for Object to always be forced to public visibility even if there’s a break in the public chain up to it.

This document has been placed in the Public Domain.