File tree 2 files changed +16
-1
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1144,7 +1144,7 @@ class Typer extends Namer
1144
1144
case _ => mapOver(t)
1145
1145
}
1146
1146
1147
- val pt1 = pt.stripTypeVar.dealias
1147
+ val pt1 = pt.stripTypeVar.dealias.normalized
1148
1148
if (pt1 ne pt1.dropDependentRefinement)
1149
1149
&& defn.isContextFunctionType(pt1.nonPrivateMember(nme.apply).info.finalResultType)
1150
1150
then
Original file line number Diff line number Diff line change
1
+ type ~> [Args <: Tuple , Return ] = Args match {
2
+ case (arg1, arg2) => ((arg1, arg2) => Return )
3
+ }
4
+
5
+ trait Builder [Args <: NonEmptyTuple ] {
6
+ def apply (f : Args ~> String ): String
7
+ }
8
+
9
+ class BuilderImpl [Args <: NonEmptyTuple ] extends Builder [Args ] {
10
+ override def apply (f : Args ~> String ): String = ???
11
+ }
12
+
13
+ val builder = BuilderImpl [Int *: String *: EmptyTuple ]()
14
+ // builder { (i: Int, s: String) => "test" } // This line compiles
15
+ val _ = builder { (i, s) => " test" } // Does not compile
You can’t perform that action at this time.
0 commit comments