Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaceMethodSource: should not catch problem silently #17886

Open
Ducasse opened this issue Feb 26, 2025 · 0 comments
Open

replaceMethodSource: should not catch problem silently #17886

Ducasse opened this issue Feb 26, 2025 · 0 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Feb 26, 2025

replaceMethodSource: aNode
	"We are being replaced with aNode -- if possible try to perform an in place edit of the source."

	| method |
	method := self methodNode.
	method ifNotNil: [ method map: self to: aNode ].
	aNode parent: self parent.
	[self replaceSourceWith: aNode] on: Error
		do:
			[:ex |
			self clearReplacements.
			ex return]

Related to this the replacement could be turned into a visitor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant