Skip to content

Commit dfa6414

Browse files
committed
Renamings and simplifications
1 parent c6132fa commit dfa6414

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Definitions {
130130
val resParamRef = enterTypeParam(cls, paramNamePrefix ++ "R", Covariant, decls).typeRef
131131
val methodType = MethodType.maker(
132132
isJava = false,
133-
isImplicit = name.isImplicitFunction,
133+
isImplicit = false,
134134
isContextual = name.isImplicitFunction,
135135
isErased = name.isErasedFunction)
136136
decls.enter(newMethod(cls, nme.apply, methodType(argParamRefs, resParamRef), Deferred))

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,19 +333,16 @@ object Types {
333333
/** Is this an alias TypeBounds? */
334334
final def isTypeAlias: Boolean = this.isInstanceOf[TypeAlias]
335335

336-
/** Is this a MethodType which is from Java */
336+
/** Is this a MethodType which is from Java? */
337337
def isJavaMethod: Boolean = false
338338

339-
/** Is this a MethodType which has implicit or contextual parameters */
339+
/** Is this a Method or PolyType which has implicit or contextual parameters? */
340340
def isImplicitMethod: Boolean = false
341341

342342
/** Is this a Method or PolyType which has contextual parameters as first value parameter list? */
343343
def isContextual: Boolean = false
344344

345-
/** Is this a Method or PolyType which has implicit parameters as first value parameter list? */
346-
def isImplicit: Boolean = false
347-
348-
/** Is this a MethodType for which the parameters will not be used */
345+
/** Is this a MethodType for which the parameters will not be used? */
349346
def isErasedMethod: Boolean = false
350347

351348
/** Is this a match type or a higher-kinded abstraction of one?
@@ -3196,7 +3193,6 @@ object Types {
31963193
final override def isContextual: Boolean =
31973194
companion.eq(ContextualMethodType) ||
31983195
companion.eq(ErasedContextualMethodType)
3199-
final override def isImplicit = isImplicitMethod
32003196

32013197
def computeSignature(implicit ctx: Context): Signature = {
32023198
val params = if (isErasedMethod) Nil else paramInfos
@@ -3389,7 +3385,7 @@ object Types {
33893385
def computeSignature(implicit ctx: Context): Signature = resultSignature
33903386

33913387
override def isContextual = resType.isContextual
3392-
override def isImplicit = resType.isImplicit
3388+
override def isImplicitMethod = resType.isImplicitMethod
33933389

33943390
/** Merge nested polytypes into one polytype. nested polytypes are normally not supported
33953391
* but can arise as temporary data structures.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3114,7 +3114,7 @@ class Typer extends Namer
31143114
*/
31153115
protected def matchingApply(methType: MethodOrPoly, pt: FunProto)(implicit ctx: Context): Boolean =
31163116
methType.isContextual == pt.isContextual ||
3117-
methType.isImplicit && pt.isContextual // for a transition allow `with` arguments for regular implicit parameters
3117+
methType.isImplicitMethod && pt.isContextual // for a transition allow `with` arguments for regular implicit parameters
31183118

31193119
/** Check that `tree == x: pt` is typeable. Used when checking a pattern
31203120
* against a selector of type `pt`. This implementation accounts for

0 commit comments

Comments
 (0)