Skip to content

Commit 3a031f5

Browse files
committed
Change <:< to overrides
This is needed to freeze the constraint.
1 parent 503011f commit 3a031f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ object RefChecks {
232232
def compatibleTypes =
233233
if (member.isType) { // intersection of bounds to refined types must be nonempty
234234
member.is(BaseTypeArg) ||
235-
(memberTp <:< otherTp) || {
235+
memberTp.overrides(otherTp) || {
236236
val jointBounds = (memberTp.bounds & otherTp.bounds).bounds
237237
jointBounds.lo <:< jointBounds.hi
238238
}

0 commit comments

Comments
 (0)