Skip to content

Commit 7fe8b14

Browse files
committed
Revert using withoutErased
not sure what I was doing there...
1 parent effb837 commit 7fe8b14

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,14 +659,14 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
659659
val formals = formals0.mapConserve(paramErasure)
660660
eraseResult(tp.resultType) match {
661661
case rt: MethodType =>
662-
tp.withoutErased.derivedLambdaType(names ++ rt.paramNames, formals ++ rt.paramInfos, rt.resultType)
662+
tp.derivedLambdaType(names ++ rt.paramNames, formals ++ rt.paramInfos, rt.resultType)
663663
case NoType =>
664664
// Can happen if we smuggle in a Nothing in the qualifier. Normally we prevent that
665665
// in Checking.checkMembersOK, but compiler-generated code can bypass this test.
666666
// See i15377.scala for a test case.
667667
NoType
668668
case rt =>
669-
tp.withoutErased.derivedLambdaType(names, formals, rt)
669+
tp.derivedLambdaType(names, formals, rt)
670670
}
671671
case tp: PolyType =>
672672
this(tp.resultType)

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3924,15 +3924,6 @@ object Types {
39243924
case c: ErasedMethodCompanion => c.isErased
39253925
case _ => super.erasedParams
39263926

3927-
def withoutErased(using Context): MethodType =
3928-
val newCompanion = companion match {
3929-
case _: ErasedMethodType => MethodType
3930-
case _: ErasedContextualMethodType => ContextualMethodType
3931-
case _: ErasedImplicitMethodType => ImplicitMethodType
3932-
case c => return this
3933-
}
3934-
newCompanion(paramNames)(paramInfosExp, resultTypeExp)
3935-
39363927
// Mark erased classes as erased parameters as well.
39373928
def markErasedClasses(using Context): MethodType =
39383929
val isErasedClass = paramInfos.map(_.isErasedClass)

0 commit comments

Comments
 (0)