File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 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
11441144 case _ => mapOver(t)
11451145 }
11461146
1147- val pt1 = pt.stripTypeVar.dealias
1147+ val pt1 = pt.stripTypeVar.dealias.normalized
11481148 if (pt1 ne pt1.dropDependentRefinement)
11491149 && defn.isContextFunctionType(pt1.nonPrivateMember(nme.apply).info.finalResultType)
11501150 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