File tree 2 files changed +15
-1
lines changed
compiler/src/dotty/tools/dotc/typer 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1783,7 +1783,10 @@ trait Applications extends Compatibility {
1783
1783
}
1784
1784
1785
1785
def resultIsMethod (tp : Type ): Boolean = tp.widen.stripPoly match
1786
- case tp : MethodType => tp.resultType.isInstanceOf [MethodType ]
1786
+ case tp : MethodType =>
1787
+ tp.resultType match
1788
+ case mt : MethodType => ! mt.isContextualMethod
1789
+ case _ => false
1787
1790
case _ => false
1788
1791
1789
1792
val found = narrowMostSpecific(candidates)
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ extension StrDeco on (tree : String ) {
3
+ def show (given DummyImplicit ): String = ???
4
+ def show (color : Boolean )(given DummyImplicit ): String = ???
5
+ }
6
+
7
+ val a : String = " foo" .show
8
+ val b : String = " foo" .show(true )
9
+ val c : Any = " foo" .show
10
+ val d : Any = " foo" .show(true )
11
+ }
You can’t perform that action at this time.
0 commit comments