Skip to content

Commit 84f32cd

Browse files
committed
Changed underlying type of RefinedThis
Now: The underlying refined type. Was: The parent of the type. We need the change because RefinedThis is used as a narrowed version of the underlying refinedType (e.g. in TypeComparer rebase), and the old scheme would lose a binding of that type.
1 parent 39cb41a commit 84f32cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,7 @@ object Types {
21312131

21322132
case class RefinedThis(binder: RefinedType) extends BoundType with SingletonType {
21332133
type BT = RefinedType
2134-
override def underlying(implicit ctx: Context) = binder.parent
2134+
override def underlying(implicit ctx: Context) = binder
21352135
def copyBoundType(bt: BT) = RefinedThis(bt)
21362136

21372137
// need to customize hashCode and equals to prevent infinite recursion for

0 commit comments

Comments
 (0)