@@ -732,19 +732,19 @@ abstract class TreeGen {
732732 def mkPatDef (pat : Tree , rhs : Tree )(implicit fresh : FreshNameCreator ): List [ValDef ] =
733733 mkPatDef(Modifiers (0 ), pat, rhs)
734734
735- private def propagateAtBoundAttachment (from : Tree , to : ValDef ): to.type =
736- if (isPatVarWarnable && from.hasAttachment[AtBoundIdentifierAttachment .type ]) to.updateAttachment(AtBoundIdentifierAttachment )
735+ private def propagateNoWarnAttachment (from : Tree , to : ValDef ): to.type =
736+ if (isPatVarWarnable && from.hasAttachment[NoWarnAttachment .type ]) to.updateAttachment(NoWarnAttachment )
737737 else to
738738
739739 // Keep marker for `x@_`, add marker for `val C(x) = ???` to distinguish from ordinary `val x = ???`.
740740 private def propagatePatVarDefAttachments (from : Tree , to : ValDef ): to.type =
741- propagateAtBoundAttachment (from, to).updateAttachment(PatVarDefAttachment )
741+ propagateNoWarnAttachment (from, to).updateAttachment(PatVarDefAttachment )
742742
743743 /** Create tree for pattern definition <mods val pat0 = rhs> */
744744 def mkPatDef (mods : Modifiers , pat : Tree , rhs : Tree )(implicit fresh : FreshNameCreator ): List [ValDef ] = matchVarPattern(pat) match {
745745 case Some ((name, tpt)) =>
746746 List (atPos(pat.pos union rhs.pos) {
747- propagateAtBoundAttachment (pat, ValDef (mods, name.toTermName, tpt, rhs))
747+ propagateNoWarnAttachment (pat, ValDef (mods, name.toTermName, tpt, rhs))
748748 })
749749
750750 case None =>
@@ -815,7 +815,7 @@ abstract class TreeGen {
815815
816816 private def unwarnable (pat : Tree ): Tree = {
817817 pat foreach {
818- case b @ Bind (_, _) => b updateAttachment AtBoundIdentifierAttachment
818+ case b @ Bind (_, _) => b updateAttachment NoWarnAttachment
819819 case _ =>
820820 }
821821 pat
@@ -917,7 +917,7 @@ abstract class TreeGen {
917917 case Ident (name) if treeInfo.isVarPattern(tree) && name != nme.WILDCARD =>
918918 atPos(tree.pos) {
919919 val b = Bind (name, atPos(tree.pos.focus) (Ident (nme.WILDCARD )))
920- if (forFor && isPatVarWarnable) b updateAttachment AtBoundIdentifierAttachment
920+ if (forFor && isPatVarWarnable) b updateAttachment NoWarnAttachment
921921 else b
922922 }
923923 case Typed (id @ Ident (name), tpt) if treeInfo.isVarPattern(id) && name != nme.WILDCARD =>
0 commit comments