You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhancement: Take purity of classes into account when capture checking
Two major changes:
1. During setup, don't generate a capture set variable for a type T if
one of the base types of `T` is a pure class.
2. During subtype checking, admit `cs T <: T` if one of the base types
of `T` is a pure class. The idea is that in this case we know that the
capture set will always be empty at runtime.
But don't do (2.) if we are checking self types. In this case the capture set cannot be
stripped. Example:
class A:
this: A =>
class B extends A
this: {c} B =>
In this case we should not assume `{c} B <: B` since we need to flag an error that the self
type of B does not conform to the self type of A.
are checking self types. In that cas
0 commit comments