Skip to content

Dig deeper on avoidance #8900

@odersky

Description

@odersky

#8867 fixed a tricky avoidance problem #8861 by introducing new techniques for preventing closure types from capturing variables they are not supposed to see.

There are several areas where our understanding of this issue is still incomplete. It would be good to follow this up with test cases, code fixes and possibly formalizations, as the subject matter is extremely slippery and the requirements for type inference are extremely stringent.

I left in the code base of #8867 several comments starting with

// AVOIDANCE TODO

This should be followed up.

Metadata

Metadata

Assignees

Labels

area:typeritype:soundnessSoundness bug (it lets us compile code that crashes at runtime with a ClassCastException)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions