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
We should not allow a private type to appear in the signature of a non-private member.
The private type is not accessible outside the scope of the member. In a "by-name" based
system for resolving types this can lead to crashes.
Example: collection.mutable.IndexedSeqView crashes when the accessibility of the This type
is restricted from protected[this] to private[this]. The crash happens in mixin when we try to refer
to This computing the signature of filter in AbstractTransformedX, which is an inner subclass
of IndexedSeqView. It can't work because This is not visible as an inherited member of AbstractTransformedX. To prevent crashes like these we have to be stricter in the frontend.
The text was updated successfully, but these errors were encountered:
@SethTisue Thanks for the pointer. Yes, this is the same issue. For dotc it is imperative that we fix this though, as a type is given only by its name/structure, with the info recomputed as needed. In general we cannot get the info of a private member outside its scope.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 8, 2016
We should not allow a private type to appear in the signature of a non-private member.
The private type is not accessible outside the scope of the member. In a "by-name" based
system for resolving types this can lead to crashes.
Example:
collection.mutable.IndexedSeqView
crashes when the accessibility of theThis
typeis restricted from
protected[this]
toprivate[this]
. The crash happens in mixin when we try to referto
This
computing the signature offilter
inAbstractTransformedX
, which is an inner subclassof
IndexedSeqView
. It can't work becauseThis
is not visible as an inherited member ofAbstractTransformedX
. To prevent crashes like these we have to be stricter in the frontend.The text was updated successfully, but these errors were encountered: