File tree 1 file changed +9
-6
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -3727,12 +3727,15 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
3727
3727
if tree.tpe.isErroneous || pt.isErroneous then
3728
3728
tree.withType(UnspecifiedErrorType )
3729
3729
else
3730
- alts.map(_.widen) match {
3731
- case List (_ : AppliedType , _ : MethodType ) | List (_ : MethodType , _ : AppliedType ) => errorAmbiguous
3732
- case List (ExprType (_ : AppliedType ), _ : MethodType ) | List (_ : MethodType , ExprType (_ : AppliedType )) => errorAmbiguous
3733
- case _ => tryParameterless(alts)(errorAmbiguous)
3734
- }
3735
-
3730
+ pt match
3731
+ case _ : FunProto => errorAmbiguous
3732
+ case _ =>
3733
+ alts.map(_.widen) match
3734
+ case List (_ : AppliedType , _ : MethodType ) | List (_ : MethodType , _ : AppliedType ) => errorAmbiguous
3735
+ case List (ExprType (_ : AppliedType ), _ : MethodType ) | List (_ : MethodType , ExprType (_ : AppliedType )) => errorAmbiguous
3736
+ case _ => tryParameterless(alts)(errorAmbiguous)
3737
+ end match
3738
+ end match
3736
3739
end match
3737
3740
end adaptOverloaded
3738
3741
You can’t perform that action at this time.
0 commit comments