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

Allowed casting for classical types is non-transitive #527

Open
ajberdy opened this issue Apr 8, 2024 · 1 comment
Open

Allowed casting for classical types is non-transitive #527

ajberdy opened this issue Apr 8, 2024 · 1 comment
Labels
documentation Documentation other than the text of the spec

Comments

@ajberdy
Copy link
Contributor

ajberdy commented Apr 8, 2024

What is the file name(s) where you found the bug?

types.rst

What is the current text that needs to be fixed or removed? (You can copy and paste)

Allowed Casts table

What should the documentation say instead?

Fixed table

Are there other related issues or pull requests about this bug?

No response

Details

According to the table, implicit casting is allowed between bool, int, uint, and float, and also from float to angle. However, bool, int, uint are not allowed to be cast to angle. This seems to imply angle(int_var) is illegal, even though implicit casting seems to allow using ints in places where floats are allowed (eg sin(int_var), or one might assume, angle(int_var)).

@ajberdy ajberdy added the documentation Documentation other than the text of the spec label Apr 8, 2024
@jwoehr
Copy link
Collaborator

jwoehr commented Apr 9, 2024

For background, see #268 and specifically @mbhealy 's comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation other than the text of the spec
Projects
None yet
Development

No branches or pull requests

2 participants