File tree 1 file changed +7
-8
lines changed
compiler/src/dotty/tools/dotc/typer 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -88,19 +88,18 @@ object ProtoTypes {
88
88
val savedConstraint = ctx.typerState.constraint
89
89
val res = pt.widenExpr match {
90
90
case pt : FunProto =>
91
- mt match {
91
+ mt match
92
92
case mt : MethodType =>
93
93
constrainResult(resultTypeApprox(mt), pt.resultType)
94
94
&& {
95
- if pt.constrainResultDeep then
96
- if mt.isImplicitMethod == (pt.applyKind == ApplyKind .Using ) then
97
- val tpargs = pt.args.lazyZip(mt.paramInfos).map(pt.typedArg)
98
- tpargs.tpes.corresponds (mt.paramInfos)(_ <:< _ )
99
- else true
95
+ if pt.constrainResultDeep
96
+ && mt.isImplicitMethod == (pt.applyKind == ApplyKind .Using )
97
+ then
98
+ val tpargs = pt.args.lazyZip (mt.paramInfos).map(pt.typedArg )
99
+ tpargs.tpes.corresponds(mt.paramInfos)(_ <:< _)
100
100
else true
101
101
}
102
102
case _ => true
103
- }
104
103
case _ : ValueTypeOrProto if ! disregardProto(pt) =>
105
104
necessarilyCompatible(mt, pt)
106
105
case pt : WildcardType if pt.optBounds.exists =>
@@ -308,7 +307,7 @@ object ProtoTypes {
308
307
* @param state The state object to use for tracking the changes to this prototype
309
308
* @param constrainResultDeep
310
309
* A flag to indicate that constrainResult on this prototype
311
- * should typechec and compare the arguments.
310
+ * should typecheck and compare the arguments.
312
311
*/
313
312
case class FunProto (args : List [untpd.Tree ], resType : Type )(
314
313
typer : Typer ,
You can’t perform that action at this time.
0 commit comments