File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ object ProtoTypes {
520
520
/** Create a new TypeVar that represents a dependent method parameter singleton */
521
521
def newDepTypeVar (tp : Type )(implicit ctx : Context ): TypeVar =
522
522
newTypeVar(TypeBounds .upper(AndType (tp.widenExpr, defn.SingletonClass .typeRef)))
523
-
523
+
524
524
/** The result type of `mt`, where all references to parameters of `mt` are
525
525
* replaced by either wildcards (if typevarsMissContext) or TypeParamRefs.
526
526
*/
Original file line number Diff line number Diff line change @@ -2640,7 +2640,14 @@ class Typer extends Namer
2640
2640
readaptSimplified(tpd.Apply (tree, args))
2641
2641
}
2642
2642
}
2643
- addImplicitArgs(argCtx(tree))
2643
+ pt.revealIgnored match {
2644
+ case pt : FunProto if pt.isGivenApply =>
2645
+ // We can end up here if extension methods are called with explicit given arguments.
2646
+ // See for instance #7119.
2647
+ tree
2648
+ case _ =>
2649
+ addImplicitArgs(argCtx(tree))
2650
+ }
2644
2651
}
2645
2652
2646
2653
/** A synthetic apply should be eta-expanded if it is the apply of an implicit function
Original file line number Diff line number Diff line change
1
+ class Impl
2
+
3
+ def (impl : Impl ) prop given Int = ???// the[Int ]
4
+
5
+
6
+ def main (args : Array [String ]): Unit = {
7
+ given as Int = 3
8
+ println(new Impl ().prop given 3 )
9
+ }
You can’t perform that action at this time.
0 commit comments