Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Impliment class Enums  #6

@rdlaitila

Description

@rdlaitila

Look into implementing a new class member type 'enum'. Possible usage:

enum : Color {
    RED,
    BLUE,
    GREEN,
}

Also allow enums with specific values:

enum : Color {
    RED = 1,
    BLUE = 2, 
    GREEN = 3
}

Enums are always public and can be accessed even if the class is not permitted to have a static class instance:

print(MyClass.Color.RED)
print(MyClass.Color.BLUE)
print(MyClass.Color.GREEN)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions