Skip to content

there is no way to declare public final fields #30

Open

Description

@calavera

The compiler always create private fields:

https://github.com/mirah/mirah/blob/master/lib/mirah/jvm/compiler.rb#L593-597

In some cases, constants for instance, public and final fields are useful.

Activity

  1. baroquebobcat commented on Sep 22, 2016

    @baroquebobcat
    Member

    Hm. I think since we're emulating Ruby's behavior it might make sense to default fields to protected. We could allow using @syntax to refer to private and public fields that are not constants.

    Maybe for that we'd want to make a syntax for declarations in cases where you want to change the visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions