File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -927,7 +927,7 @@ trait Implicits { self: Typer =>
927927 val generated1 = adapt(generated, pt, locked)
928928
929929 lazy val shadowing =
930- typed (untpd.Ident (cand.implicitRef.implicitName) withPos pos.toSynthetic)(
930+ typedUnadapted (untpd.Ident (cand.implicitRef.implicitName) withPos pos.toSynthetic)(
931931 nestedContext().addMode(Mode .ImplicitShadowing ).setExploreTyperState())
932932
933933 /** Is candidate reference the same as the `shadowing` reference? (i.e.
Original file line number Diff line number Diff line change 1+ barInt
2+ bar
Original file line number Diff line number Diff line change 1+ object Test extends App {
2+ class Bar [T ]
3+
4+ implicit def barInt : Bar [Int ] = {
5+ println(" barInt" )
6+ new Bar [Int ]
7+ }
8+ implicit def bar [T ]: Bar [T ] = {
9+ println(" bar" )
10+ new Bar [T ]
11+ }
12+
13+ implicitly[Bar [Int ]]
14+
15+ locally {
16+ def barInt : Unit = ???
17+
18+ implicitly[Bar [Int ]]
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments