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]: Invalid type inferring for literal expression #37750

Closed
KavinduZoysa opened this issue Sep 15, 2022 · 1 comment · Fixed by #38029
Closed

[Bug]: Invalid type inferring for literal expression #37750

KavinduZoysa opened this issue Sep 15, 2022 · 1 comment · Fixed by #38029
Assignees
Labels
Area/TypeChecker Type Checker related issues #Compiler Points/4 Equivalent to four day effort Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug userCategory/Compilation

Comments

@KavinduZoysa
Copy link
Contributor

Description

type Foo4 decimal|2f;

public function main() {
    Foo4 f5 = 3;  // type of 3 is `int` but should be `float`
}

Even if this example fails, the type of 3 is inferred as int. But it should be a float.

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

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Sep 15, 2022
@rdulmina rdulmina added the Points/1.5 Equivalent to one and a half day effort label Sep 21, 2022
@gimantha gimantha added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/TypeChecker Type Checker related issues #Compiler labels Sep 30, 2022
@KavinduZoysa KavinduZoysa added Points/4 Equivalent to four day effort and removed Points/1.5 Equivalent to one and a half day effort labels Oct 19, 2022
@anupama-pathirage anupama-pathirage removed the needTriage The issue has to be inspected and labeled manually label Oct 25, 2022
@github-actions
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/TypeChecker Type Checker related issues #Compiler Points/4 Equivalent to four day effort Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug userCategory/Compilation
Projects
No open projects
Status: No status
Development

Successfully merging a pull request may close this issue.

6 participants