File tree 2 files changed +4
-6
lines changed
compiler/src/dotty/tools/dotc
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3721,8 +3721,6 @@ object Types {
3721
3721
3722
3722
def companion : LambdaTypeCompanion [ThisName , PInfo , This ]
3723
3723
3724
- def erasedParams (using Context ) = List .fill(paramInfos.size)(false )
3725
-
3726
3724
/** The type `[tparams := paramRefs] tp`, where `tparams` can be
3727
3725
* either a list of type parameter symbols or a list of lambda parameters
3728
3726
*
@@ -4019,7 +4017,7 @@ object Types {
4019
4017
final override def isContextualMethod : Boolean =
4020
4018
companion.eq(ContextualMethodType )
4021
4019
4022
- override def erasedParams (using Context ): List [Boolean ] =
4020
+ def erasedParams (using Context ): List [Boolean ] =
4023
4021
paramInfos.map(p => p.hasAnnotation(defn.ErasedParamAnnot ))
4024
4022
4025
4023
def nonErasedParamCount (using Context ): Int =
Original file line number Diff line number Diff line change @@ -297,10 +297,10 @@ class PlainPrinter(_ctx: Context) extends Printer {
297
297
" (" ~ toTextRef(tp) ~ " : " ~ toTextGlobal(tp.underlying) ~ " )"
298
298
299
299
protected def paramsText (lam : LambdaType ): Text = {
300
- val erasedParams = lam.erasedParams
301
- def paramText ( ref : ParamRef , erased : Boolean ) =
300
+ def paramText ( ref : ParamRef ) =
301
+ val erased = ref.underlying.hasAnnotation(defn. ErasedParamAnnot )
302
302
keywordText(" erased " ).provided(erased) ~ ParamRefNameString (ref) ~ lambdaHash(lam) ~ toTextRHS(ref.underlying, isParameter = true )
303
- Text (lam.paramRefs.lazyZip(erasedParams). map(paramText), " , " )
303
+ Text (lam.paramRefs.map(paramText), " , " )
304
304
}
305
305
306
306
protected def ParamRefNameString (name : Name ): String = nameString(name)
You can’t perform that action at this time.
0 commit comments