Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enums are unimplemented #24

Open
egroge opened this issue Sep 9, 2020 · 0 comments
Open

Enums are unimplemented #24

egroge opened this issue Sep 9, 2020 · 0 comments
Labels
enhancement New feature or request ewasm Code generation for the eWASM system for Ethereum language Issues with the flint-2 Flint language implementation or features move ir Code generation for Libra semantic check Problems with the semantic analysis stage

Comments

@egroge
Copy link
Collaborator

egroge commented Sep 9, 2020

Enum parsing is implemented according to the flint guide.

However beyond this enums are not implemented in flint:

Semantic analysis

At the semantic analysis stage, a variable can have an enum type. For example, the following is permitted:

enum Colour: Int {
  case Red
  case Blue
  case Green
}

contract A {}

A :: (any) {
  public init() {}

  func id(colour: Colour) {
    // Do something
  }
}

However, semantic analysis does not yet allow access via the dot operator to particular variations of the enum. That is to say that Colour.Red would fail semantic analysis.

Move

Enums are not implemented in libra code generation

Ethereum

Enums are not implemented in LLVM/ eWASM code generation

@egroge egroge added enhancement New feature or request move ir Code generation for Libra ewasm Code generation for the eWASM system for Ethereum language Issues with the flint-2 Flint language implementation or features semantic check Problems with the semantic analysis stage labels Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ewasm Code generation for the eWASM system for Ethereum language Issues with the flint-2 Flint language implementation or features move ir Code generation for Libra semantic check Problems with the semantic analysis stage
Projects
None yet
Development

No branches or pull requests

1 participant