Skip to content

Commit 5b6fdc5

Browse files
committed
Drop ImplicitShadowing mode
1 parent 2a53d16 commit 5b6fdc5

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ object Mode {
6060
*/
6161
val Printing: Mode = newMode(10, "Printing")
6262

63-
/** We are currently typechecking an ident to determine whether some implicit
64-
* is shadowed - don't do any other shadowing tests.
65-
*/
66-
val ImplicitShadowing: Mode = newMode(11, "ImplicitShadowing")
67-
6863
/** We are currently in a `viewExists` check. In that case, ambiguous
6964
* implicits checks are disabled and we succeed with the first implicit
7065
* found.

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,6 @@ class Typer extends Namer
20292029
val result = if (ifpt.exists &&
20302030
xtree.isTerm &&
20312031
!untpd.isContextualClosure(xtree) &&
2032-
!ctx.mode.is(Mode.ImplicitShadowing) &&
20332032
!ctx.mode.is(Mode.Pattern) &&
20342033
!ctx.isAfterTyper)
20352034
makeContextualFunction(xtree, ifpt)
@@ -2598,7 +2597,6 @@ class Typer extends Namer
25982597
!untpd.isContextualClosure(tree) &&
25992598
!isApplyProto(pt) &&
26002599
!ctx.mode.is(Mode.Pattern) &&
2601-
!ctx.mode.is(Mode.ImplicitShadowing) &&
26022600
!ctx.isAfterTyper) {
26032601
typr.println(i"insert apply on implicit $tree")
26042602
typed(untpd.Select(untpd.TypedSplice(tree), nme.apply), pt, locked)

0 commit comments

Comments
 (0)