Skip to content

Commit 0ef03e9

Browse files
committed
Rename widenDelegate -> widenGiven
1 parent ce21de0 commit 0ef03e9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,11 +1364,11 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
13641364
* objects, since these are anyway taken to be more specific than methods
13651365
* (by condition 3a above).
13661366
*/
1367-
def widenDelegate(tp: Type, alt: TermRef): Type = tp match {
1367+
def widenGiven(tp: Type, alt: TermRef): Type = tp match {
13681368
case mt: MethodType if mt.isImplicitMethod =>
1369-
mt.derivedLambdaType(mt.paramNames, mt.paramInfos, widenDelegate(mt.resultType, alt))
1369+
mt.derivedLambdaType(mt.paramNames, mt.paramInfos, widenGiven(mt.resultType, alt))
13701370
case pt: PolyType =>
1371-
pt.derivedLambdaType(pt.paramNames, pt.paramInfos, widenDelegate(pt.resultType, alt))
1371+
pt.derivedLambdaType(pt.paramNames, pt.paramInfos, widenGiven(pt.resultType, alt))
13721372
case _ =>
13731373
if (alt.symbol.isAllOf(SyntheticGivenMethod)) tp.widenToParents
13741374
else tp
@@ -1400,8 +1400,8 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
14001400
if (winsType2) -1 else 0
14011401
}
14021402

1403-
val fullType1 = widenDelegate(alt1.widen, alt1)
1404-
val fullType2 = widenDelegate(alt2.widen, alt2)
1403+
val fullType1 = widenGiven(alt1.widen, alt1)
1404+
val fullType2 = widenGiven(alt2.widen, alt2)
14051405
val strippedType1 = stripImplicit(fullType1)
14061406
val strippedType2 = stripImplicit(fullType2)
14071407

compiler/src/dotty/tools/dotc/typer/Deriving.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ trait Deriving { this: Typer =>
5050
if (ctx.denotNamed(instanceName).exists)
5151
ctx.error(i"duplicate typeclass derivation for $clsName", pos)
5252
else {
53-
// If we set the Synthetic flag here widenDelegate will widen too far and the
53+
// If we set the Synthetic flag here widenGiven will widen too far and the
5454
// derived instance will have too low a priority to be selected over a freshly
5555
// derived instance at the summoning site.
5656
synthetics +=

0 commit comments

Comments
 (0)