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 @@ -4017,9 +4017,8 @@ object Types {
4017
4017
4018
4018
val declaredParamPrecises : List [Boolean ]
4019
4019
def paramPrecises (using Context ): List [Boolean ] =
4020
- // if declaredParamPrecises.isEmpty then paramInfos.map(_ => false)
4021
- // else
4022
- declaredParamPrecises
4020
+ if declaredParamPrecises.isEmpty then paramNames.map(_ => false )
4021
+ else declaredParamPrecises
4023
4022
4024
4023
@ threadUnsafe lazy val typeParams : List [LambdaParam ] =
4025
4024
paramNames.indices.toList.map(new LambdaParam (this , _))
@@ -4534,8 +4533,7 @@ object Types {
4534
4533
def copyBoundType (bt : BT ): Type = bt.paramRefs(paramNum)
4535
4534
private var propagatedPrecise : Boolean = false
4536
4535
protected [Types ] def setPropagatedPrecise (p : Boolean ): Unit = propagatedPrecise = p
4537
- override def isPrecise (using Context ): Boolean =
4538
- propagatedPrecise || binder.paramPrecises.nonEmpty && binder.paramPrecises(paramNum)
4536
+ override def isPrecise (using Context ): Boolean = propagatedPrecise || binder.paramPrecises(paramNum)
4539
4537
/** Optimized version of occursIn, avoid quadratic blowup when solving
4540
4538
* constraints over large ground types.
4541
4539
*/
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
290
290
def paramText (name : Name , tp : Type , precise : Boolean ) =
291
291
(if precise then " @precise " else " " ) ~ toText(name) ~ lambdaHash(lam) ~ toTextRHS(tp, isParameter = true )
292
292
val precises = lam match
293
- case pt : TypeLambda if pt.paramPrecises.nonEmpty => pt.paramPrecises
293
+ case pt : TypeLambda => pt.paramPrecises
294
294
case _ => lam.paramNames.map(_ => false )
295
295
Text (lam.paramNames.lazyZip(lam.paramInfos).lazyZip(precises).toList.map(paramText), " , " )
296
296
}
You can’t perform that action at this time.
0 commit comments