Similar to #734, but for attributes. In a covariant class an instance attribute with type List[T] would not be valid, since List is invariant.
Activity
jhance commentedon Oct 11, 2015
I wonder if theres a way to word the error message here so it would be the same as #734?
JukkaL commentedon Oct 12, 2015
Hmm.. can't come up with a good common message right now. Why not just come up with a separate message for attributes?
JukkaL commentedon Oct 12, 2015
Also, assignment to a covariant attribute should be rejected. There doesn't seem to be issue for that.
KotlinIsland commentedon Feb 2, 2023
Am I correct in thinking that an example of this issue is: