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

subtyping for map/seq #54

Closed
akashlal opened this issue Jun 5, 2016 · 1 comment
Closed

subtyping for map/seq #54

akashlal opened this issue Jun 5, 2016 · 1 comment

Comments

@akashlal
Copy link
Contributor

akashlal commented Jun 5, 2016

When a value of type map[any,any] is cast to a variable of type map[int,int] does this involve checking if every key and value present in the map can be cast to int? Or does the cast happen immediately but the next time one reads the map, the cast is done then?

@shazqadeer
Copy link
Collaborator

The cast check happens immediately. Note that the cast check is emitted only in the generated Zing code and not in the generated C code.

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

No branches or pull requests

2 participants