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

Rock accepts assignment between generics with different type #842

Closed
horasal opened this issue Oct 14, 2014 · 0 comments
Closed

Rock accepts assignment between generics with different type #842

horasal opened this issue Oct 14, 2014 · 0 comments
Milestone

Comments

@horasal
Copy link
Contributor

@horasal horasal commented Oct 14, 2014

interesting:

data: ArrayList<ArrayList<Int>>
data = ArrayList<Int> new()
data add(ArrayList<Int> new)
data[0] add(1)

This can be compiled with rock, and sometimes works. But this code is illegal. Because libgc will collect elements at anytime. So we will get a random segmentation fault.
We should at least throw a warning on this.

@fasterthanlime fasterthanlime changed the title Rock accpets assignment between generics with different type Rock accepts assignment between generics with different type Jul 9, 2015
fasterthanlime added a commit that referenced this issue Jul 10, 2015
@fasterthanlime fasterthanlime added this to the 0.9.10 milestone Jul 10, 2015
@fasterthanlime fasterthanlime added this to the 0.9.10 milestone Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants