Rock accepts assignment between generics with different type #842

Closed
zhaihj opened this Issue Oct 14, 2014 · 0 comments

Projects

None yet

2 participants

@zhaihj
Contributor
zhaihj 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 from Rock accpets assignment between generics with different type to Rock accepts assignment between generics with different type Jul 9, 2015
@fasterthanlime fasterthanlime modified the milestone: 0.9.10 Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment