Skip to content

Using Enums and constants as keys when explicitly declaring AAs #1580

@Miller162

Description

@Miller162

It would be very useful to be able to use enums or constants as keys when explicitly declaring AAs
for example

enum myEnum 
    KEY = "key1"
end enum 

myAA = { 
    myEnum.KEY: "value1"
} 

I know some languages use the following syntax, so it may be convenient to follow suit

myAA = { 
    [myEnum.KEY]: "value1"
} 

Metadata

Metadata

Assignees

Labels

New Language FeatureA proposal for a new feature to be added to the BrighterScript languageenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions