File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3721,8 +3721,6 @@ object Types {
37213721
37223722 def companion : LambdaTypeCompanion [ThisName , PInfo , This ]
37233723
3724- def erasedParams (using Context ) = List .fill(paramInfos.size)(false )
3725-
37263724 /** The type `[tparams := paramRefs] tp`, where `tparams` can be
37273725 * either a list of type parameter symbols or a list of lambda parameters
37283726 *
@@ -4019,7 +4017,7 @@ object Types {
40194017 final override def isContextualMethod : Boolean =
40204018 companion.eq(ContextualMethodType )
40214019
4022- override def erasedParams (using Context ): List [Boolean ] =
4020+ def erasedParams (using Context ): List [Boolean ] =
40234021 paramInfos.map(p => p.hasAnnotation(defn.ErasedParamAnnot ))
40244022
40254023 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 {
297297 " (" ~ toTextRef(tp) ~ " : " ~ toTextGlobal(tp.underlying) ~ " )"
298298
299299 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 )
302302 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), " , " )
304304 }
305305
306306 protected def ParamRefNameString (name : Name ): String = nameString(name)
You can’t perform that action at this time.
0 commit comments