Skip to content

Commit daa29e6

Browse files
committed
Simplifty code, addressing review comments
1 parent 0a2d995 commit daa29e6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,11 +2678,8 @@ object Types extends TypeUtils {
26782678
* refinement type `T { X = U; ... }`
26792679
*/
26802680
def reduceProjection(using Context): Type =
2681-
if (isType || true) {
2682-
val reduced = prefix.lookupRefined(name)
2683-
if (reduced.exists) reduced else this
2684-
}
2685-
else this
2681+
val reduced = prefix.lookupRefined(name)
2682+
if reduced.exists then reduced else this
26862683

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

6597-
//case tp: TermRef =>
6598-
// if stopBecauseStaticOrLocal(tp) then x else applyToPrefix(x, tp)
6599-
66006594
case tp: TypeVar =>
66016595
this(x, tp.underlying)
66026596

0 commit comments

Comments
 (0)