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

[Bug] Syntax error with custom types in has declaration #1370

Open
musab-mah-7 opened this issue Oct 12, 2024 · 1 comment
Open

[Bug] Syntax error with custom types in has declaration #1370

musab-mah-7 opened this issue Oct 12, 2024 · 1 comment

Comments

@musab-mah-7
Copy link
Collaborator

Describe the bug

The declaration has some: priv T; results in a syntax error when T is a custom type. However, this syntax works without issues for primitive types like int or str. This inconsistency needs to be addressed.

To Reproduce

  1. Create an object with a custom type using the has declaration.
  2. Attempt to compile or run the code.

Expected Outcome:

The syntax should be consistent, allowing custom types in the has declaration without errors.

@kugesan1105
Copy link
Collaborator

Correct Syntax Example:

obj Shape {
has :priv shape_type: ShapeType;

has :protect radius: float,
    area: float;

has name: str;

}

@musab-mah-7 #1405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants