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
3058
3058
else tree match {
3059
3059
case tree : Block =>
3060
3060
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)))
3061
3063
case _ =>
3062
3064
readaptSimplified(tpd.Apply (tree, args))
3063
3065
}
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