Skip to content

Runtime error when using bitwise operations on an exported Enum with @compileMembersOnly #1572

@RoryDuncan

Description

@RoryDuncan

Steps to reproduce

  1. Export a number-backed Enum
  • Add the compiler flag @compileMembersOnly
  1. Perform a bitwise operation on members of the enum
    3 Run application and observe runtime error in lua

REPL

Playground showcase error, but I ran into it locally first.
Playground

Interim Fixes

If anyone is running into this issue, you can work-around by not using @compileMembersOnly.
Also, maybe having the exported enum in another module could resolve it.

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