Skip to content

Commit

Permalink
Simplifty code, addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Feb 16, 2024
1 parent 0a2d995 commit daa29e6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2678,11 +2678,8 @@ object Types extends TypeUtils {
* refinement type `T { X = U; ... }`
*/
def reduceProjection(using Context): Type =
if (isType || true) {
val reduced = prefix.lookupRefined(name)
if (reduced.exists) reduced else this
}
else this
val reduced = prefix.lookupRefined(name)
if reduced.exists then reduced else this

/** Guard against cycles that can arise if given `op`
* follows info. The problematic cases are a type alias to itself or
Expand Down Expand Up @@ -6594,9 +6591,6 @@ object Types extends TypeUtils {
variance = saved
this(y, restpe)

//case tp: TermRef =>
// if stopBecauseStaticOrLocal(tp) then x else applyToPrefix(x, tp)

case tp: TypeVar =>
this(x, tp.underlying)

Expand Down

0 comments on commit daa29e6

Please sign in to comment.