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

Contextually expected type should flow down through arithmetic expressions #262

Closed
jclark opened this issue Jul 22, 2019 · 0 comments
Closed
Assignees
Labels
lang Relates to the Ballerina language specification spec/improve Something that should be improved in the spec
Milestone

Comments

@jclark
Copy link
Collaborator

jclark commented Jul 22, 2019

decimal a = 10.1;
decimal b = a * 10; // (1) Working 

I agree (1) should work, but I think spec needs to be clearer about this. If expression E is E1*E2, and the contextually expected type for E is decimal, then the contextually expected type for both E1 and E2 should also be decimal, but I don't see anything in the spec that says this.

Originally posted by @jclark in #261 (comment)

@jclark jclark self-assigned this Jul 22, 2019
@jclark jclark added spec/improve Something that should be improved in the spec lang Relates to the Ballerina language specification labels Jul 22, 2019
@jclark jclark added this to the 2019R3 milestone Jul 22, 2019
@jclark jclark closed this as completed in 517df24 Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang Relates to the Ballerina language specification spec/improve Something that should be improved in the spec
Projects
None yet
Development

No branches or pull requests

1 participant