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]: Constants not identifying its type #7322

Open
Rashmika998 opened this issue Oct 31, 2024 · 1 comment
Open

[Bug]: Constants not identifying its type #7322

Rashmika998 opened this issue Oct 31, 2024 · 1 comment

Comments

@Rashmika998
Copy link

Description

const CAPACITY = 100;
const EVICTION_FACTOR = 0.2;

final cache:Cache userInfoCache = new (capacity = CAPACITY, evictionFactor = EVICTION_FACTOR);

This gives the following error, as it doesn't recognize the constant types as int or float:
invalid value: For input string: "CAPACITY"
invalid value: For input string: "EVICTION_FACTOR"

It seems the constants are not being identified with their intended types.

Steps to Reproduce

No response

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@MaryamZi MaryamZi transferred this issue from ballerina-platform/ballerina-lang Nov 1, 2024
@MaryamZi
Copy link
Member

MaryamZi commented Nov 1, 2024

Related to #6036

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

No branches or pull requests

2 participants