Skip to content

Commit cd774b2

Browse files
committed
Drop ImplicitShadowing mode
1 parent 9b6becb commit cd774b2

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
@@ -2025,7 +2025,6 @@ class Typer extends Namer
20252025
val result = if (ifpt.exists &&
20262026
xtree.isTerm &&
20272027
!untpd.isContextualClosure(xtree) &&
2028-
!ctx.mode.is(Mode.ImplicitShadowing) &&
20292028
!ctx.mode.is(Mode.Pattern) &&
20302029
!ctx.isAfterTyper)
20312030
makeContextualFunction(xtree, ifpt)
@@ -2594,7 +2593,6 @@ class Typer extends Namer
25942593
!untpd.isContextualClosure(tree) &&
25952594
!isApplyProto(pt) &&
25962595
!ctx.mode.is(Mode.Pattern) &&
2597-
!ctx.mode.is(Mode.ImplicitShadowing) &&
25982596
!ctx.isAfterTyper) {
25992597
typr.println(i"insert apply on implicit $tree")
26002598
typed(untpd.Select(untpd.TypedSplice(tree), nme.apply), pt, locked)

0 commit comments

Comments
 (0)