File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -3058,6 +3058,8 @@ class Typer extends Namer
30583058 else tree match {
30593059 case tree : Block =>
30603060 readaptSimplified(tpd.Block (tree.stats, tpd.Apply (tree.expr, args)))
3061+ case tree : NamedArg =>
3062+ readaptSimplified(tpd.NamedArg (tree.name, tpd.Apply (tree.arg, args)))
30613063 case _ =>
30623064 readaptSimplified(tpd.Apply (tree, args))
30633065 }
Original file line number Diff line number Diff line change 1+ trait Parent {
2+ type Child
3+ }
4+
5+ object Demo {
6+ def params (arr : Int ): Int = ???
7+
8+ def parametersOf [Parent , T ]()(using m : String ): Int = 0
9+
10+ def combineInternal (using p : Parent ): Int = {
11+ // this implicit needs to be available
12+ implicit val s : String = " "
13+
14+ // parameter needs to be named
15+ params(arr = parametersOf[Parent , p.Child ]) // error: method parametersOf must be called with () argument
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ trait Parent {
2+ type Child
3+ }
4+
5+ object Demo {
6+ def params (arr : Int ): Int = ???
7+
8+ def parametersOf [Parent , T ]()(using m : String ): Int = 0
9+
10+ def combineInternal (using p : Parent ): Int = {
11+ // this implicit needs to be available
12+ implicit val s : String = " "
13+
14+ // parameter needs to be named
15+ params(arr = parametersOf[Parent , p.Child ]())
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments