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

[Compiler][Diagnostics] Use of new with non-object types gives a somewhat wrong error message #19568

Open
pubudu91 opened this issue Oct 24, 2019 · 0 comments
Labels
Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement

Comments

@pubudu91
Copy link
Contributor

Consider the following program:

public function main() {
    int|float f = new;
}

The above program gives the following error:

error: .::objects.bal:3:19: cannot infer type of the object from '(int|float)'
@pubudu91 pubudu91 added Type/Improvement Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler labels Oct 24, 2019
@pubudu91 pubudu91 added this to Needs triage in Ballerina Compiler Bug triage via automation Oct 24, 2019
@pubudu91 pubudu91 added this to the Ballerina 1.0.x milestone Oct 24, 2019
@pubudu91 pubudu91 moved this from Needs triage to Patch Compatible in Ballerina Compiler Bug triage Oct 24, 2019
@gimantha gimantha added this to BackLog in Sprint 1 - Compiler Front-End via automation Oct 31, 2019
@gimantha gimantha moved this from BackLog to Temporary Column in Sprint 1 - Compiler Front-End Oct 31, 2019
@MaryamZi MaryamZi moved this from Patch Compatible to [Reviewed] Minor compatible in Ballerina Compiler Bug triage Nov 1, 2019
@MaryamZi MaryamZi moved this from [Reviewed] Minor compatible to [Reviewed] Patch compatible in Ballerina Compiler Bug triage Nov 1, 2019
@hasithaa hasithaa moved this from [Reviewed] Patch compatible to Diagnostics in Ballerina Compiler Bug triage Apr 24, 2020
@hasithaa hasithaa removed this from the Ballerina 1.1.x milestone Jan 5, 2021
@gimantha gimantha added the Deferred Tag tasks not addressed >1 year, moved to closed state, until addressed in the future. label Mar 2, 2023
@gimantha gimantha removed the Deferred Tag tasks not addressed >1 year, moved to closed state, until addressed in the future. label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement
Projects
Status: No status
Ballerina Compiler Bug triage
  
Diagnostics Rewrite
Development

No branches or pull requests

6 participants