type RenameTest() =
member this.TestMethod() = "Hello, World!"
member this.TestMethodThis() = this.TestMethod()
Renaming this to _ in TestMethodThis is accepted and produces member _.TestMethodThis() = _.TestMethod(), which does not compile — in expression position _.TestMethod() is the shorthand-lambda syntax, not a reference to the self identifier.
_ is only a legal name for a binding that is never referenced, so Rename should reject it whenever the rename would rewrite more than the declaration itself. This is not specific to self identifiers — renaming any used local to _ breaks the same way.
Renaming
thisto_inTestMethodThisis accepted and producesmember _.TestMethodThis() = _.TestMethod(), which does not compile — in expression position_.TestMethod()is the shorthand-lambda syntax, not a reference to the self identifier._is only a legal name for a binding that is never referenced, so Rename should reject it whenever the rename would rewrite more than the declaration itself. This is not specific to self identifiers — renaming any used local to_breaks the same way.