File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,8 @@ trait Implicits { self: Typer =>
491
491
pt)
492
492
val generated1 = adapt(generated, pt)
493
493
lazy val shadowing =
494
- typed(untpd.Ident (ref.name) withPos pos.toSynthetic, funProto)
495
- ( nestedContext.addMode(Mode .ImplicitShadowing ).setExploreTyperState)
494
+ typed(untpd.Ident (ref.name) withPos pos.toSynthetic, funProto)(
495
+ nestedContext.addMode(Mode .ImplicitShadowing ).setExploreTyperState)
496
496
def refMatches (shadowing : Tree ): Boolean =
497
497
ref.symbol == closureBody(shadowing).symbol || {
498
498
shadowing match {
Original file line number Diff line number Diff line change @@ -320,10 +320,8 @@ object ProtoTypes {
320
320
*/
321
321
def constrained (pt : PolyType , owningTree : untpd.Tree )(implicit ctx : Context ): (PolyType , List [TypeVar ]) = {
322
322
val state = ctx.typerState
323
- def howmany = if (owningTree.isEmpty) " no" else " some"
324
- def committable = if (ctx.typerState.isCommittable) " committable" else " uncommittable"
325
- assert(owningTree.isEmpty != ctx.typerState.isCommittable,
326
- s " inconsistent: $howmany typevars were added to $committable constraint ${state.constraint}" )
323
+ assert(! (ctx.typerState.isCommittable && owningTree.isEmpty),
324
+ s " inconsistent: no typevars were added to committable constraint ${state.constraint}" )
327
325
328
326
def newTypeVars (pt : PolyType ): List [TypeVar ] =
329
327
for (n <- (0 until pt.paramNames.length).toList)
You can’t perform that action at this time.
0 commit comments